Skip to content

Fix duplicate completions bugs #23632

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
1 commit merged into from
May 1, 2018
Merged

Conversation

ghost
Copy link

@ghost ghost commented Apr 23, 2018

Fixes #23587

Will rebase against master after #23591 is in.
Also removes the "constructor", "get", "set", "private", "public", and "static" contextual keywords from global completions.
(Also removes two tests that are already covered by completionListKeywords.ts.)

@@ -2059,16 +2059,17 @@ namespace ts.Completions {
const kind = stringToToken(entry.name);
switch (keywordFilter) {
case KeywordCompletionFilters.None:
// "undefined" is a global variable, so don't need a keyword completion for it.
return kind !== SyntaxKind.UndefinedKeyword;
// TODO: GH#23631 Includes type keywords because `Array<numb/**/` is treaded as a value location currently.
Copy link
Member

Choose a reason for hiding this comment

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

isPossiblyTypeArgumentPosition we have this function to check for type argument location

Copy link
Author

Choose a reason for hiding this comment

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

Thanks, added a note to #23631

@ghost ghost merged commit 49c807e into verifyCompletions May 1, 2018
@ghost ghost deleted the rm_duplicate_completions branch May 1, 2018 20:02
@microsoft microsoft locked and limited conversation to collaborators Jul 31, 2018
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants