Hoist omitted keys from object spread operator (#13384)

This commit is contained in:
Alan Orozco
2021-05-28 09:32:30 -07:00
committed by GitHub
parent 612f19fbdc
commit f35513fbaa
21 changed files with 110 additions and 35 deletions

View File

@@ -1,3 +1,4 @@
var _excluded = ["x"];
var z = {};
var _z = z,
x = Object.assign({}, _z);
@@ -10,7 +11,7 @@ var _z3 = z,
(function (_ref) {
var x = _ref.x,
y = babelHelpers.objectWithoutProperties(_ref, ["x"]);
y = babelHelpers.objectWithoutProperties(_ref, _excluded);
});
var _o = o;

View File

@@ -1,3 +1,4 @@
const _excluded = ["x"];
var z = {};
var _z = z,
x = babelHelpers.extends({}, _z);
@@ -10,7 +11,7 @@ var _z3 = z,
(function (_ref) {
let x = _ref.x,
y = babelHelpers.objectWithoutPropertiesLoose(_ref, ["x"]);
y = babelHelpers.objectWithoutPropertiesLoose(_ref, _excluded);
});
var _o = o;

View File

@@ -1,3 +1,4 @@
var _excluded = ["x"];
var z = {};
var _z = z,
x = babelHelpers.extends({}, _z);
@@ -10,7 +11,7 @@ var _z3 = z,
(function (_ref) {
var x = _ref.x,
y = babelHelpers.objectWithoutProperties(_ref, ["x"]);
y = babelHelpers.objectWithoutProperties(_ref, _excluded);
});
var _o = o;