question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

feat: add bracket access to safe navigation operator

See original GitHub issue

I’m submitting a … (check one with “x”)

[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

The safe navigation operator ?. is great, but it would be even better if it also supported bracket notation, foo?[bar]. This was first mentioned here, but didn’t get any traction https://github.com/angular/angular/issues/791#issuecomment-77801474

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:25
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
mtuzinskiycommented, Jul 5, 2018

Any updates on this? Thank you

3reactions
pkozlowski-opensourcecommented, Mar 12, 2020

So, this is supported in TS 3.7 but not supported in expressions used in Angular templates: https://ng-run.com/edit/sqFt4zLEyZ9oOMDtmOxp

Read more comments on GitHub >

github_iconTop Results From Across the Web

Safe navigation operator with bracket property accesor
I would like to know if there is there a way to access the property using the dot notation, or if there is...
Read more >
How To Use The Safe Operator With Square Bracket Property ...
In both optional chaining and safe navigation in templates stacking the feat: add bracket access to safe navigation operator #17181.
Read more >
Safe Navigation Operator | Apex Developer Guide
Use the safe navigation operator (?.) to replace explicit, sequential checks for null references. This operator short-circuits expressions that attempt to ...
Read more >
The Safe Navigation Operator (&.) in Ruby - Georgi Mitrev
Ruby 2.3 introduces the &. operator which will make dealing with nils easier.
Read more >
Brackets Extension Registry
To install one of these extensions in Brackets, choose File > Extension Manager and ... Keywords: bind clean css data html javascript js...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found