Skip to content

Handle completions at name of namespace declaration #25661

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

Merged
2 commits merged into from
Jul 19, 2018

Conversation

ghost
Copy link

@ghost ghost commented Jul 14, 2018

Fixes #25654

@ghost ghost requested a review from sheetalkamat July 14, 2018 00:16
const isValidAccess: (symbol: Symbol) => boolean =
isNamespaceName
// At `namespace N.M/**/`, don't include `M` as a completion.
? symbol => !!(symbol.flags & SymbolFlags.Namespace) && !symbol.declarations.some(d => d.parent === node.parent)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ehh, you might be declaration merging, in which case maybe you do want completions? Sounds like you really want the check to be whether this is the only declaration.

@ghost
Copy link
Author

ghost commented Jul 18, 2018

@DanielRosenwasser Please re-review

@ghost ghost merged commit 46827f4 into master Jul 19, 2018
@ghost ghost deleted the completionsNamespaceNameIsNewIdentifier branch July 19, 2018 17:26
This pull request was closed.
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.

2 participants