Add new required methods to LanguageServiceHost

pull/3023/head
Andrew Branch 2022-03-15 09:35:42 -07:00 committed by Andrew Branch
parent 4b1abad427
commit 9119a5bd3d
1 changed files with 8 additions and 0 deletions

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;
}