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

Parsing JS with {...rest} fails #2

Open
jamesricky opened this issue Aug 23, 2019 · 1 comment
Open

Parsing JS with {...rest} fails #2

jamesricky opened this issue Aug 23, 2019 · 1 comment
Assignees

Comments

@jamesricky
Copy link

Parsing JS files with the rest-params operator does not work.

Example to reproduce this:

tests.bootstrap.php

<?php
require __DIR__ . '/vendor/autoload.php';
Kwf_TrlJsParser_JsParser::parseContent(file_get_contents("./test.js"));

test.js

const arr = [1, 2, 3, 4];
const obj = {"a": "b", "c": "d", "e": "f"};

const arrSpread = [...arr];  // Works
const {a, ...rest} = obj;    // Fails
@lllHuber
Copy link

jquery/esprima#1588

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

No branches or pull requests

3 participants