Skip to content
This repository has been archived by the owner on Feb 1, 2025. It is now read-only.

Spread operator not supported in function call #397

Open
decademoon opened this issue Jun 17, 2020 · 0 comments
Open

Spread operator not supported in function call #397

decademoon opened this issue Jun 17, 2020 · 0 comments

Comments

@decademoon
Copy link

decademoon commented Jun 17, 2020

[email protected]

The following code fails to be transformed:

async function foo() {
  bar(...await x);
}

See this babel repl.

Exception occurs at the assertion here:

Ep.explodeExpression = function(path, ignoreResult) {
const t = util.getTypes();
let expr = path.node;
if (expr) {
t.assertExpression(expr);
} else {
return expr;
}

Expected type "Expression" with option {}, but instead got "SpreadElement"
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant