* fix: ensure (a?.b)() has proper this * let test be more restrictive * fix: transformed member call should preserve computed * chore: revamp test files * refactor: simplify * fix: unwrap parthenthesizedExpression * add loose test cases * add `(a?.#b)()` support * add with-transform test cases * Update packages/babel-plugin-proposal-optional-chaining/src/index.js Co-authored-by: Justin Ridgewell <justin@ridgewell.name> * address review comments * update test fixtures Co-authored-by: Justin Ridgewell <justin@ridgewell.name>
@babel/plugin-proposal-optional-chaining
Transform optional chaining operators into a series of nil checks
See our website @babel/plugin-proposal-optional-chaining for more information.
Install
Using npm:
npm install --save-dev @babel/plugin-proposal-optional-chaining
or using yarn:
yarn add @babel/plugin-proposal-optional-chaining --dev