Urara-Blog/node_modules/.pnpm-store/v3/files/45/1bcedc0168bc732ee6df61e3efddf9b264e523f3918e5e3ae6138b290bd21d344f11b11d59057a0e65813955747f5f02c32d556a93decbbffe890d503d73f0
2022-08-14 01:14:53 +08:00

31 lines
No EOL
761 B
Text

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
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 noNewArrows = (_api$assumption = api.assumption("noNewArrows")) != null ? _api$assumption : !options.spec;
return {
name: "transform-arrow-functions",
visitor: {
ArrowFunctionExpression(path) {
if (!path.isArrowFunctionExpression()) return;
path.arrowFunctionToExpression({
allowInsertArrow: false,
noNewArrows,
specCompliant: !noNewArrows
});
}
}
};
});
exports.default = _default;