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

fix(language-core): handle empty mappings in updateVirtualCodeMapOfMap #161

Merged
merged 1 commit into from
Apr 7, 2024

Conversation

remcohaszing
Copy link
Member

If virtual code has no mappings, we still need to update virtual code maps based on a source of undefined. Without this, the TypeScript plugin isn’t able to find virtual code without mappings. For completions this means it falls back to TypeScript’s own getCompletsionsAtPosition implementation, which returns a list of everything in scope.

Refs mdx-js/mdx-analyzer#427

If virtual code has no mappings, we still need to update virtual code
maps based on a source of undefined. Without this, the TypeScript plugin
isn’t able to find virtual code without mappings. For completions this
means it falls back to TypeScript’s own `getCompletsionsAtPosition`
implementation, which returns a list of everything in scope.

Refs mdx-js/mdx-analyzer#427
@johnsoncodehk johnsoncodehk merged commit 42087b2 into master Apr 7, 2024
6 checks passed
@johnsoncodehk johnsoncodehk deleted the fix-ts-plugin-completions-empty-mappings branch April 7, 2024 13:07
@johnsoncodehk
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.

None yet

2 participants