DEV Community

Discussion on: Optional Chaining may be coming to JavaScript

Collapse
 
wahabshah23 profile image
Abdul Wahab Shah

Typescript already has this. Would be nice in vanilla Js too

Collapse
 
rapasoft profile image
Pavol Rajzak

It is present in CoffeeScript

Collapse
 
neoscrib profile image
Tanner Jepsen

Typescript does not have it. They won't implement anything in stage 1. github.com/Microsoft/TypeScript/is...

Collapse
 
evanderwpmorais profile image
Evander

I have used it in Angular isn't it Typescript?

Thread Thread
 
cristianfalcone profile image
Cristian Falcone

That's from Angular template syntax. It's called safe navigation operator. Not from TypeScript.

Collapse
 
sammyisa profile image
Sammy Israwi • Edited

So apparently there has been a lengthy, 3 years long discussion about adding this to TS, which sometimes gets heated.

But it seems from the last comment on the thread that it actually has not been implemented in TypeScript, and it wont be implemented until the ES committee locks down its semantics :/ That is, unless there's something I'm missing?