Without this, the only way to replace the arrow function is to either
manually override its `node.body`, or duplicate the arrow:
```js
// Old
ArrowFunctionExpression: function (node) {
node.body = t.blockStatement(...);
// Or
return t.ArrowFunctionExpression(
node.params,
t.blockStatement(...),
node.async
);
}
// New
ArrowFunctionExpression: function() {
this.get("body").replaceWith(t.blockStatement(...));
}
```
The compiler for writing next generation JavaScript.
For questions and support please visit the Slack community or StackOverflow. The Babel issue tracker is exclusively for bug reports and feature requests.
For documentation and website issues please visit the babel.github.io repo.
Description
Languages
JavaScript
99.5%
Makefile
0.3%
HTML
0.1%