feat: add support for TS 2.3

This commit is contained in:
Victor Berchet
2017-04-14 17:13:10 -07:00
committed by Tobias Bosch
parent 3c8a61e40c
commit 014594fe8f
4 changed files with 17 additions and 14 deletions

View File

@ -51,7 +51,7 @@ export class Symbols {
// in the parent chain). This doesn't damage the node as the binder unconditionally
// sets the parent.
externalReference.expression.parent = externalReference;
externalReference.parent = this.sourceFile;
externalReference.parent = this.sourceFile as any;
}
const from = stripQuotes(externalReference.expression.getText());
symbols.set(importEqualsDeclaration.name.text, {__symbolic: 'reference', module: from});

View File

@ -83,6 +83,9 @@ export class MockNode implements ts.Node {
getText(sourceFile?: ts.SourceFile): string { return ''; }
getFirstToken(sourceFile?: ts.SourceFile): ts.Node { return null; }
getLastToken(sourceFile?: ts.SourceFile): ts.Node { return null; }
forEachChild<T>(cbNode: (node: ts.Node) => T, cbNodeArray?: (nodes: ts.Node[]) => T): T {
return null;
}
}
export class MockIdentifier extends MockNode implements ts.Identifier {