cannabis
Version:
TypeScript AST Query library
27 lines (26 loc) • 1.31 kB
TypeScript
import { ts, tsMorph } from 'ts-simple-ast-extra';
import { ASTNode } from './astNode';
export declare function getASTNodeType(node: ASTNode): tsMorph.Type | null;
export declare function getASTNodeTypeAsString(n: ASTNode): string;
export declare function getReturnType(n: ASTNode): tsMorph.Type<ts.Type> | null;
export declare function findReferences(n: ASTNode): any;
export declare function getExtended(n: ASTNode): any;
export declare function getExtendedNames(n: ASTNode): any;
export declare function getImplemented(n: ASTNode): ASTNode[];
export declare function getDerivedClasses(n: ASTNode): ASTNode[];
export declare function getImplementations(n: ASTNode): ASTNode[];
export declare function getImplementedNames(node: ASTNode): string[];
export declare function localNames(n: ASTNode): string[] | undefined;
export declare function localNamesNotReferencing(n: ASTNode, target: string | ASTNode): string[];
export declare function locals(n: ASTNode): [] | Symbol;
interface Symbol {
flags: ts.SymbolFlags;
escapedName: ts.__String;
declarations: ts.Declaration[];
valueDeclaration: ts.Declaration;
members?: ts.SymbolTable;
exports?: ts.SymbolTable;
globalExports?: ts.SymbolTable;
}
export declare function localsDeclarations(n: ASTNode): ts.Declaration[];
export {};