Skip to content

Conversation

@gabritto
Copy link
Member

@gabritto gabritto commented Jan 27, 2022

Fixes #46371

I added a new function, getContextualKeywords, that is called in completionInfoFromData.
The alternative I've considered would be to use the existing keywordFilter mechanism, and have a new filter, KeywordFilter.Assert. However, that felt odd and difficult to implement, because keywordFilter is created in getCompletionData and assigned inside that function, and in other functions it calls, in multiple places. So it's (a) hard to follow all the conditionals and function calls that could assign to keywordFilter to make sure the variable ends up being assigned to KeywordFilter.Assert in the right places, and (b) the existing conditionals didn't reflect the cases where we should offer assert in completions.

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Jan 27, 2022
@gabritto gabritto merged commit 9028051 into main Jan 28, 2022
@gabritto gabritto deleted the gabritto/issue46371 branch January 28, 2022 00:17
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: Team For Milestone Bug PRs that fix a bug with a specific milestone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No completion for assert keyword

4 participants