Sitelet https://web.archive.org/web/20220322213850/https://github.com/angular/angular/pull/42995
Skip to content
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

feat(language-service): auto-apply optional chaining on nullable symbol #42995

Closed

Conversation

ivanwonder
Copy link
Contributor

@ivanwonder ivanwonder commented Jul 30, 2021

Support automatically inserts the optional chaining operator (?.)
when property access (.) is done on a nullable symbol.

Fixes angular/vscode-ng-language-service#1094

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@google-cla google-cla bot added the cla: yes label Jul 30, 2021
@ivanwonder ivanwonder force-pushed the auto-apply-optional-chaining branch 2 times, most recently from ae92dd2 to 029219e Compare Jul 30, 2021
@atscott
Copy link
Contributor

@atscott atscott commented Aug 2, 2021 •

(commented on wrong PR :) )

@ivanwonder ivanwonder force-pushed the auto-apply-optional-chaining branch 2 times, most recently from 8b3146d to 6bc124f Compare Aug 4, 2021
@ivanwonder ivanwonder marked this pull request as ready for review Aug 4, 2021
@ivanwonder ivanwonder requested a review from atscott Aug 4, 2021
packages/language-service/ivy/completions.ts Outdated Show resolved Hide resolved
packages/language-service/ivy/completions.ts Outdated Show resolved Hide resolved
atscott
atscott approved these changes Aug 9, 2021
Copy link
Contributor

@atscott atscott left a comment

One small request for comment. Otherwise LGTM

packages/language-service/ivy/completions.ts Show resolved Hide resolved
@atscott atscott added target: minor action: presubmit and removed action: presubmit labels Aug 9, 2021
Support automatically inserts the optional chaining operator (`?.`)
when property access (`.`) is done on a nullable symbol.

Fixes angular/vscode-ng-language-service#1094
@ivanwonder ivanwonder force-pushed the auto-apply-optional-chaining branch from 0768443 to db77474 Compare Aug 10, 2021
@atscott atscott added the action: merge label Aug 11, 2021
@ivanwonder ivanwonder deleted the auto-apply-optional-chaining branch Aug 13, 2021
@ties-s
Copy link

@ties-s ties-s commented Aug 31, 2021 •

How does this handle #37619?

@ivanwonder
Copy link
Contributor Author

@ivanwonder ivanwonder commented Sep 1, 2021

It's still a bug, this will auto-apply optional chaining for you, foo?.bar?.baz, because the LS relies on the code the compiler generates.

TeriGlover added a commit to TeriGlover/angular that referenced this issue Sep 16, 2021
…ol (angular#42995)

Support automatically inserts the optional chaining operator (`?.`)
when property access (`.`) is done on a nullable symbol.

Fixes angular/vscode-ng-language-service#1094

PR Close angular#42995
TeriGlover added a commit to TeriGlover/angular that referenced this issue Sep 22, 2021
…ol (angular#42995)

Support automatically inserts the optional chaining operator (`?.`)
when property access (`.`) is done on a nullable symbol.

Fixes angular/vscode-ng-language-service#1094

PR Close angular#42995
@angular-automatic-lock-bot
Copy link

@angular-automatic-lock-bot angular-automatic-lock-bot bot commented Oct 2, 2021

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Oct 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge cla: yes target: minor
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants