Skip to content

Fix completion lists for 'readonly' and 'const' keywords#32377

Merged
sheetalkamat merged 7 commits into
microsoft:masterfrom
minajevs:fix29666
Jul 16, 2019
Merged

Fix completion lists for 'readonly' and 'const' keywords#32377
sheetalkamat merged 7 commits into
microsoft:masterfrom
minajevs:fix29666

Conversation

@minajevs
Copy link
Copy Markdown
Contributor

@minajevs minajevs commented Jul 12, 2019

Fixes #29658 and #29666

#29666:
Added readonly keyword to "Type Keywords" list. It caused one test to fail, which I had to fix. That test was failing because it relied on existing behavior, but was not testing this behavior.

#29658:
Added new TypeAssertionKeywords filter to KeywordCompletionFilters, which is resolved to type keyword + const keyword. const keyword is not valid type keyword, so I decided to have it in separate filter, instead of putting it into type keywords.

Formatting
My autoformatter fixed some minor formatting errors. Hope it is OK to keep them in this PR :)

@msftclas
Copy link
Copy Markdown

msftclas commented Jul 12, 2019

CLA assistant check
All CLA requirements met.

Comment thread src/services/completions.ts Outdated
Comment thread tests/cases/fourslash/completionListAsConst.ts Outdated
Comment thread tests/cases/fourslash/completionListAsConst.ts Outdated
@minajevs
Copy link
Copy Markdown
Contributor Author

minajevs commented Jul 16, 2019

Thanks @sheetalkamat! Improved isTypeAssertion check and widened tests.

@sheetalkamat sheetalkamat merged commit 664671c into microsoft:master Jul 16, 2019
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
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.

completion list doesn't suggest 'const' in type assertion

4 participants