Is there a way to enable support of optional chaining operators in WebStorm
Asked Answered
O

2

8

I work on a project where we use optional chaining operator (aka Elvis operator):

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

Is it a way to make WebStorm understand it?

P.S. It's a part of stage-1 proposals: https://github.com/tc39/proposal-optional-chaining

Oblong answered 24/8, 2017 at 13:44 Comment(1)
It has been released. You can close this issue.Inculpate
S
3

Finally typescript version 3.7 supports optional chaining. For webstorm to support it you need to update it to the latest version. It would work as expected.

Typescript - https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html

Webstorm Release notes - https://blog.jetbrains.com/webstorm/2019/10/webstorm-2019-2-4/

Selmaselman answered 8/11, 2019 at 20:54 Comment(0)
B
1

Here is an issue about this https://youtrack.jetbrains.com/issue/WEB-27592. Seems like it's resolved so we can wait for the feature in next build.

Bestialize answered 13/9, 2017 at 5:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.