ts-budgie
Version:
Converts TypeScript code to Budgie.
54 lines (53 loc) • 1.81 kB
TypeScript
import { CaseStyleConverterBag, NameSplitter } from "budgie";
import * as ts from "typescript";
import { Transformation } from "../../../output/transformation";
import { RootAliaser } from "../../../parsing/aliasers/rootAliaser";
import { VisitorContext } from "../../context";
import { NodeVisitRouter } from "../../router";
import { INodeVisitorDependencies, NodeVisitor } from "../../visitor";
/**
* Creates transformations for a type of property access, if possible.
*/
export declare abstract class PropertyAccessChecker {
/**
* Generates Budgie-friendly names for nodes.
*/
protected readonly aliaser: RootAliaser;
/**
* Transforms words between cases.
*/
protected readonly casing: CaseStyleConverterBag;
/**
* Shared context for visitors in a file.
*/
protected readonly context: VisitorContext;
/**
* Splits name strings into words.
*/
protected readonly nameSplitter: NameSplitter;
/**
* Routes visitors for node types.
*/
protected readonly router: NodeVisitRouter;
/**
* Source file for nodes.
*/
protected readonly sourceFile: ts.SourceFile;
/**
* Type checker for the source file.
*/
protected readonly typeChecker: ts.TypeChecker;
/**
* Initializes a new instance of the PropertyAccessChecker class.
*
* @param dependencies Dependencies to be used for initialization.
*/
constructor(dependencies: INodeVisitorDependencies | NodeVisitor);
/**
* Creates transformations for a type of property access.
*
* @param node Node to transform.
* @returns Transformations for the node, if possible.
*/
abstract visit(node: ts.Node): Transformation[] | undefined;
}