Pick up TS 4.7 for bundling with VS Code

This commit is contained in:
Matt Bierner
2022-05-02 15:50:09 -07:00
parent e3e4bfacc3
commit 17ee4c4265
5 changed files with 21 additions and 10 deletions

View File

@@ -52,7 +52,21 @@ function getLanguageServiceHost(scriptKind: ts.ScriptKind) {
};
},
getCurrentDirectory: () => '',
getDefaultLibFileName: (_options: ts.CompilerOptions) => 'es6'
getDefaultLibFileName: (_options: ts.CompilerOptions) => 'es6',
readFile: (path: string, _encoding?: string | undefined): string | undefined => {
if (path === currentTextDocument.uri) {
return currentTextDocument.getText();
} else {
return libs.loadLibrary(path);
}
},
fileExists: (path: string): boolean => {
if (path === currentTextDocument.uri) {
return true;
} else {
return !!libs.loadLibrary(path);
}
}
};
return ts.createLanguageService(host);
});