This commit is contained in:
Alexander T
2019-06-20 10:51:29 +03:00
parent 882dfd265c
commit 38652d4cd7
10 changed files with 56 additions and 54 deletions

View File

@@ -20,8 +20,8 @@ class DeclarationsWalker {
}
static getExtraDeclarations(typeChecker: ts.TypeChecker, protocolFile: ts.SourceFile): string {
const walker = new DeclarationsWalker(typeChecker, protocolFile);
let text = "declare namespace ts.server.protocol {\n";
var walker = new DeclarationsWalker(typeChecker, protocolFile);
walker.visitTypeNodes(protocolFile);
text = walker.text
? `declare namespace ts.server.protocol {\n${walker.text}}`