compat-table icon indicating copy to clipboard operation
compat-table copied to clipboard

es6 rest destructuring in arguments

Open nicolas-cherel opened this issue 9 years ago • 2 comments

Rest destructuring in arguments should work just as assignment destructuring (does not work in babel, firefox & safari) so there is a compat issue here.

((...[, v,, u]) => [v, u] )(1, 2, 3, 4)

returns

[2, 4]

Assignment example for reference:

(() => { let [a, b, ...[[c]]]= [1, 2, [3]]; return [a, b, c] })()

returns

[1, 2, 3]

nicolas-cherel avatar Sep 15 '16 10:09 nicolas-cherel

Can you please provide PR or describe the problem in more details?

chicoxyzzy avatar Sep 20 '16 16:09 chicoxyzzy

@chicoxyzzy ok ! I started with a PR, but I shied away :) I'll take another PR as example, and should be able to provide a proper test.

nicolas-cherel avatar Sep 20 '16 16:09 nicolas-cherel