re: 😲🤯The most outstanding new feature in Javascript you need to know about: Optional Chaining VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Thanks for mentioning this! I don't work with TS that often but I think at some point they will support it :) does TS support babeljs? if yes may...
 

I'm pretty sure typescript has something like this ... I know because my last angular project came to a point where I used the ? in a way similar to this to disambiguate values extracted from defined types in the app. Nothing major (it was my first project) but I definitely remember finding usage of "?" as a means of testing type attributes without using a long if condition with explicit null checking. I'll have to confirm by looking at my project code.

Are you maybe referring to Ternary operators?

Interestingly enough today at work I opened up the project in question and was unable to find where I used the "?" in the typescript. I think it may have been in an html file using an ng directive but had to switch off to other work before I finalized my search.

You could be right...I'll confirm again tomorrow.

code of conduct - report abuse