Run prettier
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import remapAsyncToGenerator from "babel-helper-remap-async-to-generator";
|
||||
import syntaxAsyncGenerators from "babel-plugin-syntax-async-generators";
|
||||
|
||||
export default function ({ types: t }) {
|
||||
export default function({ types: t }) {
|
||||
const yieldStarVisitor = {
|
||||
Function(path) {
|
||||
path.skip();
|
||||
@@ -12,7 +12,10 @@ export default function ({ types: t }) {
|
||||
const callee = state.addHelper("asyncGeneratorDelegate");
|
||||
node.argument = t.callExpression(callee, [
|
||||
t.callExpression(state.addHelper("asyncIterator"), [node.argument]),
|
||||
t.memberExpression(state.addHelper("asyncGenerator"), t.identifier("await")),
|
||||
t.memberExpression(
|
||||
state.addHelper("asyncGenerator"),
|
||||
t.identifier("await"),
|
||||
),
|
||||
]);
|
||||
},
|
||||
};
|
||||
@@ -27,9 +30,13 @@ export default function ({ types: t }) {
|
||||
|
||||
remapAsyncToGenerator(path, state.file, {
|
||||
wrapAsync: t.memberExpression(
|
||||
state.addHelper("asyncGenerator"), t.identifier("wrap")),
|
||||
state.addHelper("asyncGenerator"),
|
||||
t.identifier("wrap"),
|
||||
),
|
||||
wrapAwait: t.memberExpression(
|
||||
state.addHelper("asyncGenerator"), t.identifier("await")),
|
||||
state.addHelper("asyncGenerator"),
|
||||
t.identifier("await"),
|
||||
),
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user