Merge pull request #3023 from andrewbranch/update-03152022

Add new required methods to LanguageServiceHost
This commit is contained in:
Henning Dieterichs 2022-03-16 11:55:35 +01:00 committed by GitHub
commit ca2692a0dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -181,6 +181,14 @@ export class TypeScriptWorker implements ts.LanguageServiceHost, ITypeScriptWork
return fileName === this.getDefaultLibFileName(this._compilerOptions);
}
readFile(path: string): string | undefined {
return this._getScriptText(path);
}
fileExists(path: string): boolean {
return this._getScriptText(path) !== undefined;
}
async getLibFiles(): Promise<Record<string, string>> {
return libFileMap;
}