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: add config to enable auto-apply optional chaining on nullable symbol #1469

Merged
merged 2 commits into from
Aug 24, 2021

Conversation

ivanwonder
Copy link
Contributor

@ivanwonder ivanwonder commented Aug 3, 2021

wait for PR to land

@google-cla google-cla bot added the cla: yes label Aug 3, 2021
@ivanwonder ivanwonder marked this pull request as draft August 3, 2021 12:38
@ivanwonder ivanwonder force-pushed the auto-apply-optional-chaining branch 3 times, most recently from d027ee1 to ba7ee34 Compare August 7, 2021 02:38
@ivanwonder ivanwonder changed the title feat(language-service): enable auto-apply optional chaining on nullab… feat: add config to enable auto-apply optional chaining on nullable symbol Aug 7, 2021
@ivanwonder ivanwonder marked this pull request as ready for review August 7, 2021 02:43
@atscott atscott added the target: minor This PR is targeted for the next minor release label Aug 11, 2021
Copy link
Collaborator

@atscott atscott left a comment

Choose a reason for hiding this comment

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

We should also add a test for this. You'll have to make some updates:

  • Update the package.json and server/package.json versions to be 13.0.0-next.2. This is the version your change to @angular/language-service is in
  • Update the test application's tsconfig.json to have "strict": true (this took me a while to figure out
  • Add a test to ivy_spec.ts

Here's the commit where I finally got this to work: 7ed5d3f. You'll probably want to clean that up a bit more.

integration/lsp/viewengine_spec.ts Outdated Show resolved Hide resolved
@ivanwonder
Copy link
Contributor Author

  • Update the test application's tsconfig.json to have "strict": true (this took me a while to figure out

"description": "Enable/disable showing completions on potentially undefined values that insert an optional chain call. Requires TS 3.7+ and strict null checks to be enabled."

Requires TS 3.7+ and strict null checks to be enabled. It already adds to the description. I copy this from the extensions of ts in vscode

@atscott
Copy link
Collaborator

atscott commented Aug 21, 2021

  • Update the test application's tsconfig.json to have "strict": true (this took me a while to figure out

"description": "Enable/disable showing completions on potentially undefined values that insert an optional chain call. Requires TS 3.7+ and strict null checks to be enabled."

Requires TS 3.7+ and strict null checks to be enabled. It already adds to the description. I copy this from the extensions of ts in vscode

Yea, I just didn’t expect it to not already be enabled in the test project 😅

@atscott atscott added the action: merge Ready to merge label Aug 24, 2021
@atscott atscott merged commit 4fcbdb7 into angular:master Aug 24, 2021
@ivanwonder ivanwonder deleted the auto-apply-optional-chaining branch August 25, 2021 00:47
@angular-automatic-lock-bot
Copy link

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 Sep 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge Ready to merge cla: yes target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants