Pick up TS 4.7 for building VS Code (#145273)

Adds fixes for https://github.com/microsoft/TypeScript/issues/48276
This commit is contained in:
Matt Bierner
2022-03-17 10:10:35 -08:00
committed by GitHub
parent 4999deba86
commit bc9de9e7eb
9 changed files with 83 additions and 40 deletions

View File

@@ -593,7 +593,7 @@ class CacheEntry {
constructor(
public readonly sourceFile: ts.SourceFile,
public readonly mtime: number
) {}
) { }
}
export class DeclarationResolver {
@@ -723,6 +723,12 @@ class TypeScriptLanguageServiceHost implements ts.LanguageServiceHost {
isDefaultLibFileName(fileName: string): boolean {
return fileName === this.getDefaultLibFileName(this._compilerOptions);
}
readFile(path: string, _encoding?: string): string | undefined {
return this._files[path] || this._libs[path];
}
fileExists(path: string): boolean {
return path in this._files || path in this._libs;
}
}
export function execute(): IMonacoDeclarationResult {