Skip to content
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

ResolvedModuleWithFailedLookupLocations does not publicly expose failedLookupLocations #28770

Open
alxhub opened this issue Nov 30, 2018 · 4 comments
Assignees
Labels
API Relates to the public API for TypeScript Bug A bug in TypeScript
Milestone

Comments

@alxhub
Copy link

alxhub commented Nov 30, 2018

TypeScript Version: 3.3.0-dev.20181130

Search Terms: ResolvedModuleWithFailedLookupLocations, failedLookupLocations

Expected behavior: ts.ResolvedModuleWithFailedLookupLocations has a failedLookupLocations property which reports locations where the lookup was tried and failed.

Actual behavior: failedLookupLocations is marked @internal and thus not available in the public typings. This is in contrast to ResolvedTypeReferenceDirectiveWithFailedLookupLocations which does expose the failedLookupLocations, which leads me to believe this was an omission and not an intentional hiding of the field.

Related Issues: #28276

@alxhub alxhub changed the title ResolvedModuleWithFailedLookupLocations does not have failedLookupLocations ResolvedModuleWithFailedLookupLocations does not publicly expose failedLookupLocations Nov 30, 2018
@sheetalkamat
Copy link
Member

#13139 explicitly marked failedLookupLocations as internal since its implementation detail. Infact I think it missed doing it for ResolvedTypeReferenceDirectiveWithFailedLookupLocations

@alxhub
Copy link
Author

alxhub commented Nov 30, 2018

Thank you for the information! In that case I would suggest maybe changing the type name, as it was surprising to me that a return value of type ResolvedModuleWithFailedLookupLocations did not actually have failedLookupLocations.

@weswigham weswigham added Bug A bug in TypeScript API Relates to the public API for TypeScript labels Nov 30, 2018
@sandersn sandersn added this to the Future milestone Dec 11, 2018
@Kinrany
Copy link

Kinrany commented Jan 9, 2019

I also had this issue. My use case is a script that replaces "classic" imports with "node": I was trying to use ts.classicNameResolver's lookup locations for debug output.

@HoldYourWaffle
Copy link
Contributor

I would also love to have access to this. My use case would be debugging and showing helpful error messages to users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Relates to the public API for TypeScript Bug A bug in TypeScript
Projects
None yet
Development

No branches or pull requests

6 participants