This commit is contained in:
2022-07-18 02:50:52 +00:00
parent befd344ab0
commit 06181b34d6
8569 changed files with 818704 additions and 352705 deletions
+5 -4
View File
@@ -8,10 +8,10 @@ exports.default = void 0;
var _helperPluginUtils = require("@babel/helper-plugin-utils");
var _default = (0, _helperPluginUtils.declare)((api, options) => {
var _api$assumption;
api.assertVersion(7);
const {
spec
} = options;
const noNewArrows = (_api$assumption = api.assumption("noNewArrows")) != null ? _api$assumption : !options.spec;
return {
name: "transform-arrow-functions",
visitor: {
@@ -19,7 +19,8 @@ var _default = (0, _helperPluginUtils.declare)((api, options) => {
if (!path.isArrowFunctionExpression()) return;
path.arrowFunctionToExpression({
allowInsertArrow: false,
specCompliant: !!spec
noNewArrows,
specCompliant: !noNewArrows
});
}