Skip to content

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

Merged
Sheetal Nandi (sheetalkamat) merged 7 commits into
microsoft:masterfrom
minajevs:fix29666
Jul 16, 2019
Merged

Sheetal Nandi (sheetalkamat) merged 7 commits into
microsoft:masterfrom
minajevs:fix29666

Conversation

@minajevs

@minajevs Dmitrijs Minajevs (minajevs) commented Jul 12, 2019 •

Copy link
Copy Markdown
Contributor

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

Microsoft Contribution License Agreements (msftclas) commented Jul 12, 2019 •

Copy link
Copy Markdown

CLA assistant check
All CLA requirements met.

Comment thread src/services/completions.ts Resolved
@minajevs

Dmitrijs Minajevs (minajevs) commented Jul 16, 2019 •

Copy link
Copy Markdown
Contributor Author

Thanks Sheetal Nandi (@sheetalkamat)! Improved isTypeAssertion check and widened tests.

@sheetalkamat
Sheetal Nandi (sheetalkamat) merged commit 664671c into microsoft:master Jul 16, 2019
@microsoft 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

⌂ Proxy