Skip to content

Support optional deprecated when completion #2357

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
merged 5 commits into from
Oct 29, 2020

Conversation

yoyo930021
Copy link
Member

@yoyo930021 yoyo930021 commented Oct 7, 2020

Fixed #2326

@yoyo930021 yoyo930021 changed the title Support optional deprecated completions Support optional deprecated when completion Oct 7, 2020
@yoyo930021 yoyo930021 force-pushed the fix-optional-chaining branch 2 times, most recently from 3d29453 to a7372e0 Compare October 7, 2020 15:42
kind: toCompletionItemKind(entry.kind),
textEdit: range && TextEdit.replace(range, entry.name),
kind: kinds.color ? CompletionItemKind.Color : toCompletionItemKind(entry.kind),
textEdit: range && TextEdit.replace(range, entry.insertText || entry.name),
Copy link
Member

Choose a reason for hiding this comment

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

Let's mostly follow VS Code's source code's logic, so in the future it's easy to update.
Besides, there's too many condition in a single statement so we should simplify it.

@octref octref force-pushed the fix-optional-chaining branch from a7372e0 to 5166dc0 Compare October 29, 2020 15:10
@octref octref merged commit 2ebf844 into vuejs:master Oct 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug with optional chaining autocompletion with strictNullCheck enabled
2 participants