TS1109, WebStorm incorrectly reacting on optional chaining TS1109, WebStorm incorrectly reacting on optional chaining typescript typescript

TS1109, WebStorm incorrectly reacting on optional chaining


TypeScript compiler service reports the error here because optional chaining is not supported in TypeScript < 3.7. Service is used for JavaScript linting if the service is enabled in Settings | Languages & Frameworks | TypeScript and "allowJs" is set to true in tsconfig.json.

If you only want the service to compile/lint TypeScript, make sure that "allowJs" is either not set or set to false in tsconfig.json


I was facing the same issue, then updating webstorm to this verion worked. So simple solution is updating the webstorm version. Make sure you are using typescript version 3.7 or above since optional chaining is supported in later versions only.

enter image description here


As of 2019-10-01, optional chaining is available in TypeScript 3.7 beta.

I don't know if the current version of WebStorm can be configured to use the beta, but the early release version (2019.3 EAP #5) supports TypeScript 3.7.