Closed coudly closed 8 years ago
debug screenshot
Thanks - I'll take a look
It appears that this is not valid ES6 - see https://github.com/ternjs/acorn/issues/388 - Object rest is a babel extension. I'll see if I can patch it up, however support for non-ES6 constructs is not guaranteed as they may change in the future.
This should be fixed in https://github.com/MatAtBread/fast-async/releases/tag/6.0.30
Please re-open if you this doesn't fix your issues. Thanks for reporting it.
Best I can tell this only implements Rest. i.e.
let { x, y, ...z } = { x: 1, y: 2, a: 3, b: 4 };
not Spread
let n = { x, y, ...z };
I haven't done the most thorough testing, but our toolchain is choking on nodents ability to parse spread.
[IGNORE THIS - SEE BELOW]
This appears to be a bug in Acorn (the parser used by fast-async/nodent). Acorn adheres strictly to the ECMA spec, and I believe this is an extension - it fails in Babel as well unless you enable the objectRestSpread
option (see astexplorer.net), as well as in Esprima, Shift, recast and Traceur.
The current ECMA standard permits the Spread operator in array literals, not object literals.
If you think this is part of the ECMA standard, please post an issue with Acorn I will look into a fix when it has been updated: https://github.com/ternjs/acorn/issues
...actually, this should work with fast-async (rather than nodent), as it uses Babylon (from Babel) as the parser, not acorn. I'll see if I can work out what it's doing in the next few days
I think
fast-async
andrest spread
is not incompatible the error sample :origin es file
babel options
exception stack info