This commit is contained in:
parent
d597678def
commit
5aa87aab8d
@ -123,7 +123,7 @@ function plainFunction(path: NodePath, callId: Object) {
|
||||
REF: path.scope.generateUidIdentifier("ref"),
|
||||
FUNCTION: built,
|
||||
PARAMS: node.params.reduce((acc, param) => {
|
||||
acc.done = acc.done || !t.isIdentifier(param);
|
||||
acc.done = acc.done || t.isAssignmentPattern(param) || t.isRestElement(param);
|
||||
|
||||
if (!acc.done) {
|
||||
acc.params.push(path.scope.generateUidIdentifier("x"));
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
async function one(a, b = 1) {}
|
||||
async function two(a, b, ...c) {}
|
||||
async function three(a, b = 1, c, d = 3) {}
|
||||
async function four(a, b = 1, c, ...d) {}
|
||||
async function four(a, b = 1, c, ...d) {}
|
||||
async function five(a, {b}){}
|
||||
async function six(a, {b} = {}){}
|
||||
|
||||
@ -28,4 +28,20 @@ let four = (() => {
|
||||
return function four(_x5) {
|
||||
return _ref4.apply(this, arguments);
|
||||
};
|
||||
})();
|
||||
|
||||
let five = (() => {
|
||||
var _ref5 = babelHelpers.asyncToGenerator(function* (a, { b }) {});
|
||||
|
||||
return function five(_x6, _x7) {
|
||||
return _ref5.apply(this, arguments);
|
||||
};
|
||||
})();
|
||||
|
||||
let six = (() => {
|
||||
var _ref6 = babelHelpers.asyncToGenerator(function* (a, { b } = {}) {});
|
||||
|
||||
return function six(_x8) {
|
||||
return _ref6.apply(this, arguments);
|
||||
};
|
||||
})();
|
||||
Loading…
x
Reference in New Issue
Block a user