In my project I am using TS 3.7.2 which should support optional chaining. But when I try to use it like that: const state = urlParams.state?.toString()
I get the error:
Support for the experimental syntax 'optionalChaining' isn't currently enabled
Add @babel/plugin-proposal-optional-chaining (https://git.io/vb4Sk) to the 'plugins' section of your Babel config to enable transformation.
I checked release notes and didn't see any requirements about adding tsconfig options for that feature.
I am wondering if I need babel plugin & config when I am using TS already, and how should I fix the error?