Add return types

This commit is contained in:
Kim Biesbjerg 2017-03-30 14:40:51 +02:00
parent daaebede6f
commit 030ab145d6

View File

@ -48,7 +48,11 @@ export abstract class AbstractAstParser {
}, initialValue);
}
protected _printAllChildren(sourceFile: ts.SourceFile, node: ts.Node, depth = 0) {
protected _syntaxKindToName(kind: ts.SyntaxKind): string {
return ts.SyntaxKind[kind];
}
protected _printAllChildren(sourceFile: ts.SourceFile, node: ts.Node, depth = 0): void {
console.log(
new Array(depth + 1).join('----'),
`[${node.kind}]`,
@ -62,8 +66,4 @@ export abstract class AbstractAstParser {
node.getChildren(sourceFile).forEach(childNode => this._printAllChildren(sourceFile, childNode, depth));
}
protected _syntaxKindToName(kind: ts.SyntaxKind) {
return ts.SyntaxKind[kind];
}
}