convert-ast.d.ts 507 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
import * as ts from 'typescript';
export interface NodeWrap {
    node: ts.Node;
    kind: ts.SyntaxKind;
    children: NodeWrap[];
    next?: NodeWrap;
    skip?: NodeWrap;
    parent?: NodeWrap;
}
export interface WrappedAst extends NodeWrap {
    node: ts.SourceFile;
    next: NodeWrap;
    skip: undefined;
    parent: undefined;
}
export interface ConvertedAst {
    wrapped: WrappedAst;
    flat: ReadonlyArray<ts.Node>;
}
export declare function convertAst(sourceFile: ts.SourceFile): ConvertedAst;