-
Notifications
You must be signed in to change notification settings - Fork 504
Support for the experimental syntax 'optionalChaining' #369
Copy link
Copy link
Closed
Labels
kind: featureNew feature or requestNew feature or request
Description
Current Behavior
Could not use optional chaining with tsdx@0.11.0 and typescript@3.7.3:
(babel plugin) SyntaxError: /some-path/Foo.ts: Support for the experimental syntax 'optionalChaining' isn't currently enabled (1:19):
> 1 | console.log(foo.bar?.foo)
Desired Behavior
Optional chaining is enabled
Suggested Solution
- Issue has been solved in https://github.com/facebook/create-react-app/pull/7438/files with 2 new babel plugins:
// Adds syntax support for optional chaining (.?)
{ name: '@babel/plugin-proposal-optional-chaining' },
// Adds syntax support for default value using ?? operator
{ name: '@babel/plugin-proposal-nullish-coalescing-operator' },
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
kind: featureNew feature or requestNew feature or request