fix(lsp): implement missing ts server host apis (#23131)

This commit is contained in:
Nayeem Rahman 2024-03-29 20:00:58 +00:00 committed by GitHub
parent c53b720656
commit 524e451bfb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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,