remove export function Function
This commit is contained in:
parent
4df9cf6c05
commit
8efeae80af
@ -43,7 +43,7 @@ export function AssignmentPattern(node, parent, detected) {
|
||||
}
|
||||
}
|
||||
|
||||
export function Function(node, parent, detected) {
|
||||
exports.Function = function (node, parent, detected) {
|
||||
if (node.generator) {
|
||||
detected("es6.generators");
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@ export { manipulateOptions } from "./bluebird-coroutines";
|
||||
|
||||
export var optional = true;
|
||||
|
||||
export function Function(node, parent, scope, file) {
|
||||
exports.Function = function (node, parent, scope, file) {
|
||||
if (!node.async || node.generator) return;
|
||||
|
||||
return remapAsyncToGenerator(node, file.addHelper("async-to-generator"), scope);
|
||||
|
||||
@ -8,7 +8,7 @@ export function manipulateOptions(opts) {
|
||||
|
||||
export var optional = true;
|
||||
|
||||
export function Function(node, parent, scope, file) {
|
||||
exports.Function = function (node, parent, scope, file) {
|
||||
if (!node.async || node.generator) return;
|
||||
|
||||
return remapAsyncToGenerator(
|
||||
@ -16,4 +16,4 @@ export function Function(node, parent, scope, file) {
|
||||
t.memberExpression(file.addImport("bluebird", null, true), t.identifier("coroutine")),
|
||||
scope
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user