Skip to content

Use safe some function to handle undefined declarations (fixes #27338) #27485

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

Conversation

IllusionMH
Copy link
Contributor

Fixes #27338

This fix uses safe variant of some implementation, that will skip cases where resolvedModuleSymbol.declarations is undefined. After applying this fix and using built TS version in VS Code I can see adequate suggestions when I call for completion info.

This fix uses similar approach as code few lined below so I'm not sure if I need to add unit tests here. If unit tests are must have in this case - would be grateful for suggest how to achieve undefined declarations.

@RyanCavanaugh RyanCavanaugh merged commit c04faa1 into microsoft:master Oct 2, 2018
@RyanCavanaugh
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to get variable suggestions in VS Code, error in TS Server logs
2 participants