Ad

Question About Optional Chaining And Nullish Coalescing JavaScript Operators Support In PhpStorm

I wanted to ask if anyone knows how one can support the JavaScript nullish coalescing operator (??) and the optional chaining operator (?.) in PhpStorm.

Currently I am developing a project in react-native in PhpStorm, both operators work fine but PhpStorm sets an expression expected error and all files using these operators become error underlined.

How can I add support for these features so the IDE is happy?

Ad

Answer

JavaScript Nullish Coalescing support was implemented more than a year ago, see WEB-32660. Please make sure that you are using the most recent IDE version and that the JavaScript language version is set to ECMAScript 6 or React JSX in Settings | Languages & Frameworks | JavaScript

Ad
source: stackoverflow.com
Ad