-
Notifications
You must be signed in to change notification settings - Fork 12.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LanguageServiceHost.getDefaultLibFileName
is confusing
#35318
Labels
Unactionable
There isn't something we can do with this issue
Comments
I agree, that is very confusing. |
RyanCavanaugh
added
the
Unactionable
There isn't something we can do with this issue
label
Dec 10, 2019
This isn't worth taking a breaking change over. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: