Mauro Bringolf b83e0ec7b0 2nd try: Add loose option for es2015-parameters transformation (#5943)
* Import changes to parameters package from previous branch

* Refactor plugin option access via state
2017-07-12 17:36:44 -04:00

16 lines
245 B
JavaScript

const a = 1;
function rest(b = a, ...a) {
assert.equal(b, 1);
}
rest(undefined, 2)
function rest2(b = a, ...a) {
assert.equal(a[0], 2);
}
rest2(undefined, 2)
function rest3(b = a, ...a) {
assert.equal(a.length, 1);
}
rest3(undefined, 2)