From 9119a5bd3db0beaec02259e1b512cd1749f27124 Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Tue, 15 Mar 2022 09:35:42 -0700 Subject: [PATCH] Add new required methods to LanguageServiceHost --- src/language/typescript/tsWorker.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/language/typescript/tsWorker.ts b/src/language/typescript/tsWorker.ts index a6f10943..b7465c8a 100644 --- a/src/language/typescript/tsWorker.ts +++ b/src/language/typescript/tsWorker.ts @@ -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> { return libFileMap; }