Consider rest params for array pattern in exports.

This commit is contained in:
Artem Yavorsky
2017-03-18 16:02:06 +02:00
parent 06f67e1ad3
commit b608e28aa7
7 changed files with 23 additions and 10 deletions

View File

@@ -0,0 +1,5 @@
"use strict";
const [foo, bar = 2] = [];
exports.foo = foo;
exports.bar = bar;

View File

@@ -0,0 +1 @@
export const [foo, bar, ...baz] = [];

View File

@@ -0,0 +1,6 @@
"use strict";
const [foo, bar, ...baz] = [];
exports.foo = foo;
exports.bar = bar;
exports.bar = baz;

View File

@@ -1 +1 @@
export const [foo, bar = 2] = [1];
export const [foo, bar] = [];

View File

@@ -1,5 +1,5 @@
"use strict";
const [foo, bar = 2] = [1];
const [foo, bar] = [];
exports.foo = foo;
exports.bar = bar;