Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use SpreadElement or experimentalObjectRestSpread #234

Open
kamihouse opened this issue Mar 12, 2019 · 3 comments
Open

Cannot use SpreadElement or experimentalObjectRestSpread #234

kamihouse opened this issue Mar 12, 2019 · 3 comments

Comments

@kamihouse
Copy link

In version 5.0.0 it is not possible to use the spread operator.
When you try to use the following code:

{
  "parserOptions": {
    "ecmaVersion": 2018, // or 6
    "ecmaFeatures": {
      "jsx": true,
      "experimentalObjectRestSpread": true,
      "SpreadElement": true
    }
  },
...

I got this error: 31:18 error Parsing error: Unexpected token .. on code:

let {x, y, ...z} = {x: 1, y: 2, a: 3, b: 4};
console.log(x); // 1
console.log(y); // 2
console.log(z); // { a: 3, b: 4 }
@doamatto
Copy link

doamatto commented Jul 9, 2020

I just ran it through myself and it seems to be fine

@xiaomosimon
Copy link

I also encountered this problem, still 6.0.0 version

@xiaomosimon
Copy link

Have you found a solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants