Henry Zhu 5e0508d57c object rest - fix when destructuring in variables/parameters (#4755)
* object rest - fix when destructuring in variables/parameters

* fixes + ExportNamedDeclaration support

* Account for CatchClause

* support ForXStatement

* support assignment expression? + PR fixes
2016-11-15 11:31:03 -05:00

25 lines
882 B
JavaScript

var z = {};
var x = babelHelpers.objectWithoutProperties(z, []);
var a = babelHelpers.objectWithoutProperties({ a: 1 }, []);
var x = babelHelpers.objectWithoutProperties(a.b, []);
var x = babelHelpers.objectWithoutProperties(a(), []);
var { x1 } = z;
var y1 = babelHelpers.objectWithoutProperties(z, ["x1"]);
x1++;
var { [a]: b } = z;
var c = babelHelpers.objectWithoutProperties(z, [a]);
var { x1 } = z;
var y1 = babelHelpers.objectWithoutProperties(z, ["x1"]);
let { x2, y2 } = z;
let z2 = babelHelpers.objectWithoutProperties(z, ["x2", "y2"]);
const { w3, x3, y3 } = z;
const z4 = babelHelpers.objectWithoutProperties(z, ["w3", "x3", "y3"]);
let {
x: { a: xa, [d]: f }
} = complex;
let asdf = babelHelpers.objectWithoutProperties(complex.x, ["a", d]),
d = babelHelpers.objectWithoutProperties(complex.y, []),
g = babelHelpers.objectWithoutProperties(complex, ["x"]);