You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
507 B
21 lines
507 B
4 years ago
|
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;
|