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

syntax error by rest parameter of spread syntax #2113

Open
misogihagi opened this issue Apr 11, 2022 · 4 comments
Open

syntax error by rest parameter of spread syntax #2113

misogihagi opened this issue Apr 11, 2022 · 4 comments

Comments

@misogihagi
Copy link

misogihagi commented Apr 11, 2022

hello
sorry if my misleading, my code is not parsed by esprima

Steps to reproduce

copy and paste below to demo

var ops={
    a:1,
    b:2
}

function fn(ops){
    console.log(ops)
}

fn({...ops})

Actual output

Error: Line 10: Unexpected token ...

@jogibear9988
Copy link

you can try my fork esprima-next, there this works
https://github.com/node-projects/esprima-next

@theloveofcode
Copy link

@jogibear9988 Have you figured out a way to replace esprima with your package when nested dependencies rely on esprima? For instance, Terser requires esprima through nested dependencies. I've covered the problem more here.

@jogibear9988
Copy link

no, never tried.
I've never faced this issue.
But as development seem to have stopped here completely maybe some of the packages would decide to switch to my fork

@jogibear9988
Copy link

maybe raise an issue at the other packages

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

No branches or pull requests

3 participants