From 524e451bfbd36d3f5a00a16a7115b31b56805f10 Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Fri, 29 Mar 2024 20:00:58 +0000 Subject: [PATCH] fix(lsp): implement missing ts server host apis (#23131) --- cli/tsc/99_main_compiler.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cli/tsc/99_main_compiler.js b/cli/tsc/99_main_compiler.js index e473004918..bfac52ccea 100644 --- a/cli/tsc/99_main_compiler.js +++ b/cli/tsc/99_main_compiler.js @@ -544,6 +544,19 @@ delete Object.prototype.__proto__; getGlobalTypingsCacheLocation() { return undefined; }, + // @ts-ignore Undocumented method. + toPath(fileName) { + // @ts-ignore Undocumented function. + ts.toPath( + fileName, + this.getCurrentDirectory(), + this.getCanonicalFileName(fileName), + ); + }, + // @ts-ignore Undocumented method. + watchNodeModulesForPackageJsonChanges() { + return { close() {} }; + }, getSourceFile( specifier, languageVersion,