💻
How are you using Babel?
Programmatic API (babel.transform, babel.parse)
Input code
Configuration file name
No response
Configuration
const { parse } = require("@babel/parser");
const input = `({ ...(z) } = {});`;
const result = parse(input, { createParenthesizedExpressions: true });
console.dir(result, { depth: null });
I didn't find a way to set createParenthesizedExpressions in Babel's REPL, however this issue manifests itself in Prettier (playground).
Current and expected behavior
Current: SyntaxError: Invalid rest operator's argument.
Expected: no error
Environment
this doesn't depend on the environment
Possible solution
No response
Additional context
No response
💻
How are you using Babel?
Programmatic API (
babel.transform,babel.parse)Input code
Configuration file name
No response
Configuration
I didn't find a way to set
createParenthesizedExpressionsin Babel's REPL, however this issue manifests itself in Prettier (playground).Current and expected behavior
Current:
SyntaxError: Invalid rest operator's argument.Expected: no error
Environment
this doesn't depend on the environment
Possible solution
No response
Additional context
No response