diff --git a/packages/babel-plugin-proposal-class-properties/test/fixtures/private/destructuring-array-pattern-1/output.js b/packages/babel-plugin-proposal-class-properties/test/fixtures/private/destructuring-array-pattern-1/output.js index 7cfaa943cf89..a0843639f55a 100644 --- a/packages/babel-plugin-proposal-class-properties/test/fixtures/private/destructuring-array-pattern-1/output.js +++ b/packages/babel-plugin-proposal-class-properties/test/fixtures/private/destructuring-array-pattern-1/output.js @@ -1,5 +1,3 @@ -function _classPrivateFieldDestructureSet(receiver, privateMap) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to set private field on non-instance"); } var descriptor = privateMap.get(receiver); if (descriptor.set) { if (!("__destrObj" in descriptor)) { descriptor.__destrObj = { set value(v) { descriptor.set.call(receiver, v); } }; } return descriptor.__destrObj; } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } return descriptor; } } - var Foo = function Foo(props) { "use strict"; @@ -12,7 +10,7 @@ var Foo = function Foo(props) { babelHelpers.classPrivateFieldSet(this, _client, 1); ; - [this.x = babelHelpers.classPrivateFieldGet(this, _client), _classPrivateFieldDestructureSet(this, _client).value, this.y = babelHelpers.classPrivateFieldGet(this, _client)] = props; + [this.x = babelHelpers.classPrivateFieldGet(this, _client), babelHelpers.classPrivateFieldDestructureSet(this, _client).value, this.y = babelHelpers.classPrivateFieldGet(this, _client)] = props; }; var _client = new WeakMap(); diff --git a/packages/babel-plugin-proposal-class-properties/test/fixtures/private/destructuring-array-pattern-2/output.js b/packages/babel-plugin-proposal-class-properties/test/fixtures/private/destructuring-array-pattern-2/output.js index 9701f71cc023..6b6ded747e55 100644 --- a/packages/babel-plugin-proposal-class-properties/test/fixtures/private/destructuring-array-pattern-2/output.js +++ b/packages/babel-plugin-proposal-class-properties/test/fixtures/private/destructuring-array-pattern-2/output.js @@ -1,5 +1,3 @@ -function _classPrivateFieldDestructureSet(receiver, privateMap) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to set private field on non-instance"); } var descriptor = privateMap.get(receiver); if (descriptor.set) { if (!("__destrObj" in descriptor)) { descriptor.__destrObj = { set value(v) { descriptor.set.call(receiver, v); } }; } return descriptor.__destrObj; } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } return descriptor; } } - var Foo = function Foo(props) { "use strict"; @@ -11,7 +9,7 @@ var Foo = function Foo(props) { }); ; - [x, ..._classPrivateFieldDestructureSet(this, _client).value] = props; + [x, ...babelHelpers.classPrivateFieldDestructureSet(this, _client).value] = props; }; var _client = new WeakMap(); diff --git a/packages/babel-plugin-proposal-class-properties/test/fixtures/private/destructuring-array-pattern/output.js b/packages/babel-plugin-proposal-class-properties/test/fixtures/private/destructuring-array-pattern/output.js index 31a06aeb6e38..f156f89acc5a 100644 --- a/packages/babel-plugin-proposal-class-properties/test/fixtures/private/destructuring-array-pattern/output.js +++ b/packages/babel-plugin-proposal-class-properties/test/fixtures/private/destructuring-array-pattern/output.js @@ -1,5 +1,3 @@ -function _classPrivateFieldDestructureSet(receiver, privateMap) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to set private field on non-instance"); } var descriptor = privateMap.get(receiver); if (descriptor.set) { if (!("__destrObj" in descriptor)) { descriptor.__destrObj = { set value(v) { descriptor.set.call(receiver, v); } }; } return descriptor.__destrObj; } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } return descriptor; } } - var Foo = function Foo(props) { "use strict"; @@ -11,7 +9,7 @@ var Foo = function Foo(props) { }); ; - [_classPrivateFieldDestructureSet(this, _client).value] = props; + [babelHelpers.classPrivateFieldDestructureSet(this, _client).value] = props; }; var _client = new WeakMap(); diff --git a/packages/babel-plugin-proposal-class-properties/test/fixtures/private/destructuring-object-pattern-1/output.js b/packages/babel-plugin-proposal-class-properties/test/fixtures/private/destructuring-object-pattern-1/output.js index 294c47a4a670..5fe723f2fb25 100644 --- a/packages/babel-plugin-proposal-class-properties/test/fixtures/private/destructuring-object-pattern-1/output.js +++ b/packages/babel-plugin-proposal-class-properties/test/fixtures/private/destructuring-object-pattern-1/output.js @@ -1,5 +1,3 @@ -function _classPrivateFieldDestructureSet(receiver, privateMap) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to set private field on non-instance"); } var descriptor = privateMap.get(receiver); if (descriptor.set) { if (!("__destrObj" in descriptor)) { descriptor.__destrObj = { set value(v) { descriptor.set.call(receiver, v); } }; } return descriptor.__destrObj; } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } return descriptor; } } - var Foo = function Foo(props) { "use strict"; @@ -14,7 +12,7 @@ var Foo = function Foo(props) { ; ({ x: this.x = babelHelpers.classPrivateFieldGet(this, _client), - y: _classPrivateFieldDestructureSet(this, _client).value, + y: babelHelpers.classPrivateFieldDestructureSet(this, _client).value, z: this.z = babelHelpers.classPrivateFieldGet(this, _client) } = props); }; diff --git a/packages/babel-plugin-proposal-class-properties/test/fixtures/private/destructuring-object-pattern-2/output.js b/packages/babel-plugin-proposal-class-properties/test/fixtures/private/destructuring-object-pattern-2/output.js index 7a3e10fac78d..f903c8058189 100644 --- a/packages/babel-plugin-proposal-class-properties/test/fixtures/private/destructuring-object-pattern-2/output.js +++ b/packages/babel-plugin-proposal-class-properties/test/fixtures/private/destructuring-object-pattern-2/output.js @@ -1,5 +1,3 @@ -function _classPrivateFieldDestructureSet(receiver, privateMap) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to set private field on non-instance"); } var descriptor = privateMap.get(receiver); if (descriptor.set) { if (!("__destrObj" in descriptor)) { descriptor.__destrObj = { set value(v) { descriptor.set.call(receiver, v); } }; } return descriptor.__destrObj; } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } return descriptor; } } - var Foo = function Foo(props) { "use strict"; @@ -13,7 +11,7 @@ var Foo = function Foo(props) { ; ({ x, - ..._classPrivateFieldDestructureSet(this, _client).value + ...babelHelpers.classPrivateFieldDestructureSet(this, _client).value } = props); }; diff --git a/packages/babel-plugin-proposal-class-properties/test/fixtures/private/destructuring-object-pattern/output.js b/packages/babel-plugin-proposal-class-properties/test/fixtures/private/destructuring-object-pattern/output.js index 111b0da6dafe..4ef881446880 100644 --- a/packages/babel-plugin-proposal-class-properties/test/fixtures/private/destructuring-object-pattern/output.js +++ b/packages/babel-plugin-proposal-class-properties/test/fixtures/private/destructuring-object-pattern/output.js @@ -1,5 +1,3 @@ -function _classPrivateFieldDestructureSet(receiver, privateMap) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to set private field on non-instance"); } var descriptor = privateMap.get(receiver); if (descriptor.set) { if (!("__destrObj" in descriptor)) { descriptor.__destrObj = { set value(v) { descriptor.set.call(receiver, v); } }; } return descriptor.__destrObj; } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } return descriptor; } } - var Foo = function Foo(props) { "use strict"; @@ -12,7 +10,7 @@ var Foo = function Foo(props) { ; ({ - client: _classPrivateFieldDestructureSet(this, _client).value + client: babelHelpers.classPrivateFieldDestructureSet(this, _client).value } = props); };