Is there a way to enable support for optional chaining operators in WebStorm

I am working on a project in which we use the optional chain operator (aka the Elvis operator):

const baz = new obj?.foo?.bar?.baz()

Is this a way to get WebStorm to understand this?

PS This is part of the first proposal stage-1: https://github.com/tc39/proposal-optional-chaining.

+6
source share
2 answers

Here is the problem about this https://youtrack.jetbrains.com/issue/WEB-27592 . It seems to be allowed, so we can wait for the function in the next build.

+1
source

(2018.3.4) -, . ?

0

Source: https://habr.com/ru/post/1684384/


All Articles