LanguageServiceHost.getDefaultLibFileName
is confusing
#35318
Labels
Unactionable
There isn't something we can do with this issue
TypeScript Version: 3.7.2
Search Terms:
LanguageServiceHost, getDefaultLibFileName
Code
Expected behavior:
I can pass
ts.getDefaultLibFileName
for the propertygetDefaultLibFileName
ofserviceHost
.Actual behavior:
I have to pass
ts.getDefaultLibFilePath
for the propertygetDefaultLibFileName
.When I pass
ts.getDefaultLibFileName
,getScriptSnapshot
only has the fileName (e.g.lib.esnext.full.d.ts
) as an argument instead of the full path (e.g./home/simon/folder/node_modules/typescript/lib/lib.esnext.full.d.ts
) and whengetScriptSnapshot
is called, it fails to read the file.Maybe the
getDefaultLibFileName
property could be replaced with agetDefaultLibFilePath
property, currently it is a bit confusing :/Wiki Link: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#incremental-build-support-using-the-language-services
The text was updated successfully, but these errors were encountered: