Skip to content

Conversation

ghost
Copy link

@ghost ghost commented Feb 20, 2018

Sequel to #21973 -- since we can have isGlobalCompletion === false for global completions, give it a different name isInSnippetScope and make unrelated to CompletionKind.
May also fix #21790 due to not returning needsConvertPropertyAccess: true on CompletionKind.None.

@ghost ghost requested review from sheetalkamat and armanio123 February 20, 2018 22:59
@@ -753,6 +754,7 @@ namespace ts.Completions {
log("getCompletionData: Is inside comment: " + (timestamp() - start));

let insideJsDocTagTypeExpression = false;
let isInSnippetScope = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

should not this default to true then? it used to default to Global before. we do not want to change the behavior really since we have no test coverage here.

Copy link
Author

Choose a reason for hiding this comment

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

I think this is correct -- we only assigned completionKind = CompletionKind.Global; in one place before, and that location is now the only assignment to isInSnippetScope.

@ghost ghost merged commit 4f30970 into master Feb 21, 2018
@ghost ghost deleted the isInSnippetScope branch February 21, 2018 21:12
@microsoft microsoft locked and limited conversation to collaborators Jul 3, 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.

TypeError: Cannot read property 'getChildren' of undefined in 'Object.findChildOfKind' during 'completions'
1 participant