diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/generate/index.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/generate/index.js index 96ba5747b3549b..c14f22880c4ef6 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/generate/index.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/generate/index.js @@ -22,6 +22,9 @@ const FILTER_OUT_PLUGINS = [ 'transform-destructuring' ]; +// Copied from `@babel/helper-transform-fixture-test-runner` +const EXTERNAL_HELPERS_VERSION = "7.100.0"; + await mkdir(DEST_DIR_PATH, {recursive: true}); await rm(DEST_DIR_PATH, {recursive: true}); await cp(SRC_DIR_PATH, DEST_DIR_PATH, {recursive: true}); @@ -166,7 +169,7 @@ async function transform(inputPath, outputPath, options) { } else { options.plugins = []; } - options.plugins.push('@babel/plugin-external-helpers'); + options.plugins.push(['@babel/plugin-external-helpers', {helperVersion: EXTERNAL_HELPERS_VERSION}]); const {code} = await transformFileAsync(inputPath, options); await writeFile(outputPath, code); diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/nested-class/super-call-in-decorator/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/nested-class/super-call-in-decorator/output.js index 3b9cd3f47f3998..efa4487a969eb0 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/nested-class/super-call-in-decorator/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/nested-class/super-call-in-decorator/output.js @@ -1,10 +1,5 @@ "use strict"; -function _applyDecs(e, t, n, r, o, i) { var a, c, u, s, f, l, p, d = Symbol.metadata || Symbol.for("Symbol.metadata"), m = Object.defineProperty, h = Object.create, y = [h(null), h(null)], v = t.length; function g(t, n, r) { return function (o, i) { n && (i = o, o = e); for (var a = 0; a < t.length; a++) i = t[a].apply(o, r ? [i] : []); return r ? i : o; }; } function b(e, t, n, r) { if ("function" != typeof e && (r || void 0 !== e)) throw new TypeError(t + " must " + (n || "be") + " a function" + (r ? "" : " or undefined")); return e; } function applyDec(e, t, n, r, o, i, u, s, f, l, p) { function d(e) { if (!p(e)) throw new TypeError("Attempted to access private element on non-instance"); } var h = [].concat(t[0]), v = t[3], w = !u, D = 1 === o, S = 3 === o, j = 4 === o, E = 2 === o; function I(t, n, r) { return function (o, i) { return n && (i = o, o = e), r && r(o), P[t].call(o, i); }; } if (!w) { var P = {}, k = [], F = S ? "get" : j || D ? "set" : "value"; if (f ? (l || D ? P = { get: _setFunctionName(function () { return v(this); }, r, "get"), set: function (e) { t[4](this, e); } } : P[F] = v, l || _setFunctionName(P[F], r, E ? "" : F)) : l || (P = Object.getOwnPropertyDescriptor(e, r)), !l && !f) { if ((c = y[+s][r]) && 7 != (c ^ o)) throw Error("Decorating two elements with the same name (" + P[F].name + ") is not supported yet"); y[+s][r] = o < 3 ? 1 : o; } } for (var N = e, O = h.length - 1; O >= 0; O -= n ? 2 : 1) { var T = b(h[O], "A decorator", "be", !0), z = n ? h[O - 1] : void 0, A = {}, H = { kind: ["field", "accessor", "method", "getter", "setter", "class"][o], name: r, metadata: a, addInitializer: function (e, t) { if (e.v) throw new TypeError("attempted to call addInitializer after decoration was finished"); b(t, "An initializer", "be", !0), i.push(t); }.bind(null, A) }; if (w) c = T.call(z, N, H), A.v = 1, b(c, "class decorators", "return") && (N = c);else if (H.static = s, H.private = f, c = H.access = { has: f ? p.bind() : function (e) { return r in e; } }, j || (c.get = f ? E ? function (e) { return d(e), P.value; } : I("get", 0, d) : function (e) { return e[r]; }), E || S || (c.set = f ? I("set", 0, d) : function (e, t) { e[r] = t; }), N = T.call(z, D ? { get: P.get, set: P.set } : P[F], H), A.v = 1, D) { if ("object" == typeof N && N) (c = b(N.get, "accessor.get")) && (P.get = c), (c = b(N.set, "accessor.set")) && (P.set = c), (c = b(N.init, "accessor.init")) && k.unshift(c);else if (void 0 !== N) throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined"); } else b(N, (l ? "field" : "method") + " decorators", "return") && (l ? k.unshift(N) : P[F] = N); } return o < 2 && u.push(g(k, s, 1), g(i, s, 0)), l || w || (f ? D ? u.splice(-1, 0, I("get", s), I("set", s)) : u.push(E ? P[F] : b.call.bind(P[F])) : m(e, r, P)), N; } function w(e) { return m(e, d, { configurable: !0, enumerable: !0, value: a }); } return void 0 !== i && (a = i[d]), a = h(null == a ? null : a), f = [], l = function (e) { e && f.push(g(e)); }, p = function (t, r) { for (var i = 0; i < n.length; i++) { var a = n[i], c = a[1], l = 7 & c; if ((8 & c) == t && !l == r) { var p = a[2], d = !!a[3], m = 16 & c; applyDec(t ? e : e.prototype, a, m, d ? "#" + p : _toPropertyKey(p), l, l < 2 ? [] : t ? s = s || [] : u = u || [], f, !!t, d, r, t && d ? function (t) { return _checkInRHS(t) === e; } : o); } } }, p(8, 0), p(0, 0), p(8, 1), p(0, 1), l(u), l(s), c = f, v || w(e), { e: c, get c() { var n = []; return v && [w(e = applyDec(e, [t], r, e.name, 5, n)), g(n, 1)]; } }; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } -function _setFunctionName(e, t, n) { "symbol" == typeof t && (t = (t = t.description) ? "[" + t + "]" : ""); try { Object.defineProperty(e, "name", { configurable: !0, value: n ? n + " " + t : t }); } catch (e) {} return e; } -function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? typeof e : "null")); return e; } class Hello { constructor() { return () => () => "hello"; @@ -22,7 +17,7 @@ class Outer extends Hello { } } _Inner = Inner; - [_init_hello, _init_extra_hello] = _applyDecs(_Inner, [], [[_helloDecs, 0, "hello"]]).e; + [_init_hello, _init_extra_hello] = babelHelpers.applyDecs2311(_Inner, [], [[_helloDecs, 0, "hello"]]).e; return new Inner(); } } diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/nested-class/super-property-in-accessor-key/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/nested-class/super-property-in-accessor-key/output.js index 7ed8a8d924c443..5f2f2a61517c81 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/nested-class/super-property-in-accessor-key/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/nested-class/super-property-in-accessor-key/output.js @@ -1,12 +1,5 @@ "use strict"; -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } -function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; } -function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); } -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } class Hello { toString() { return 'hello'; @@ -17,16 +10,16 @@ class Outer extends Hello { let _computedKey; super(); var _A = /*#__PURE__*/new WeakMap(); - _computedKey = _toPropertyKey(super.toString()); + _computedKey = babelHelpers.toPropertyKey(super.toString()); class Inner { constructor() { - _classPrivateFieldInitSpec(this, _A, 'hello'); + babelHelpers.classPrivateFieldInitSpec(this, _A, 'hello'); } get [_computedKey]() { - return _classPrivateFieldGet(_A, this); + return babelHelpers.classPrivateFieldGet2(_A, this); } set [_computedKey](v) { - _classPrivateFieldSet(_A, this, v); + babelHelpers.classPrivateFieldSet2(_A, this, v); } } return new Inner(); diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/nested-class/super-property-in-decorator/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/nested-class/super-property-in-decorator/output.js index dcc1fdda3db197..c9cbbec71d8a28 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/nested-class/super-property-in-decorator/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/nested-class/super-property-in-decorator/output.js @@ -1,10 +1,5 @@ "use strict"; -function _applyDecs(e, t, n, r, o, i) { var a, c, u, s, f, l, p, d = Symbol.metadata || Symbol.for("Symbol.metadata"), m = Object.defineProperty, h = Object.create, y = [h(null), h(null)], v = t.length; function g(t, n, r) { return function (o, i) { n && (i = o, o = e); for (var a = 0; a < t.length; a++) i = t[a].apply(o, r ? [i] : []); return r ? i : o; }; } function b(e, t, n, r) { if ("function" != typeof e && (r || void 0 !== e)) throw new TypeError(t + " must " + (n || "be") + " a function" + (r ? "" : " or undefined")); return e; } function applyDec(e, t, n, r, o, i, u, s, f, l, p) { function d(e) { if (!p(e)) throw new TypeError("Attempted to access private element on non-instance"); } var h = [].concat(t[0]), v = t[3], w = !u, D = 1 === o, S = 3 === o, j = 4 === o, E = 2 === o; function I(t, n, r) { return function (o, i) { return n && (i = o, o = e), r && r(o), P[t].call(o, i); }; } if (!w) { var P = {}, k = [], F = S ? "get" : j || D ? "set" : "value"; if (f ? (l || D ? P = { get: _setFunctionName(function () { return v(this); }, r, "get"), set: function (e) { t[4](this, e); } } : P[F] = v, l || _setFunctionName(P[F], r, E ? "" : F)) : l || (P = Object.getOwnPropertyDescriptor(e, r)), !l && !f) { if ((c = y[+s][r]) && 7 != (c ^ o)) throw Error("Decorating two elements with the same name (" + P[F].name + ") is not supported yet"); y[+s][r] = o < 3 ? 1 : o; } } for (var N = e, O = h.length - 1; O >= 0; O -= n ? 2 : 1) { var T = b(h[O], "A decorator", "be", !0), z = n ? h[O - 1] : void 0, A = {}, H = { kind: ["field", "accessor", "method", "getter", "setter", "class"][o], name: r, metadata: a, addInitializer: function (e, t) { if (e.v) throw new TypeError("attempted to call addInitializer after decoration was finished"); b(t, "An initializer", "be", !0), i.push(t); }.bind(null, A) }; if (w) c = T.call(z, N, H), A.v = 1, b(c, "class decorators", "return") && (N = c);else if (H.static = s, H.private = f, c = H.access = { has: f ? p.bind() : function (e) { return r in e; } }, j || (c.get = f ? E ? function (e) { return d(e), P.value; } : I("get", 0, d) : function (e) { return e[r]; }), E || S || (c.set = f ? I("set", 0, d) : function (e, t) { e[r] = t; }), N = T.call(z, D ? { get: P.get, set: P.set } : P[F], H), A.v = 1, D) { if ("object" == typeof N && N) (c = b(N.get, "accessor.get")) && (P.get = c), (c = b(N.set, "accessor.set")) && (P.set = c), (c = b(N.init, "accessor.init")) && k.unshift(c);else if (void 0 !== N) throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined"); } else b(N, (l ? "field" : "method") + " decorators", "return") && (l ? k.unshift(N) : P[F] = N); } return o < 2 && u.push(g(k, s, 1), g(i, s, 0)), l || w || (f ? D ? u.splice(-1, 0, I("get", s), I("set", s)) : u.push(E ? P[F] : b.call.bind(P[F])) : m(e, r, P)), N; } function w(e) { return m(e, d, { configurable: !0, enumerable: !0, value: a }); } return void 0 !== i && (a = i[d]), a = h(null == a ? null : a), f = [], l = function (e) { e && f.push(g(e)); }, p = function (t, r) { for (var i = 0; i < n.length; i++) { var a = n[i], c = a[1], l = 7 & c; if ((8 & c) == t && !l == r) { var p = a[2], d = !!a[3], m = 16 & c; applyDec(t ? e : e.prototype, a, m, d ? "#" + p : _toPropertyKey(p), l, l < 2 ? [] : t ? s = s || [] : u = u || [], f, !!t, d, r, t && d ? function (t) { return _checkInRHS(t) === e; } : o); } } }, p(8, 0), p(0, 0), p(8, 1), p(0, 1), l(u), l(s), c = f, v || w(e), { e: c, get c() { var n = []; return v && [w(e = applyDec(e, [t], r, e.name, 5, n)), g(n, 1)]; } }; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } -function _setFunctionName(e, t, n) { "symbol" == typeof t && (t = (t = t.description) ? "[" + t + "]" : ""); try { Object.defineProperty(e, "name", { configurable: !0, value: n ? n + " " + t : t }); } catch (e) {} return e; } -function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? typeof e : "null")); return e; } class Hello { dec() { return () => "hello"; @@ -23,7 +18,7 @@ class Outer extends Hello { } } _Inner = Inner; - [_init_hello, _init_extra_hello] = _applyDecs(_Inner, [], [[_helloDecs, 16, "hello"]]).e; + [_init_hello, _init_extra_hello] = babelHelpers.applyDecs2311(_Inner, [], [[_helloDecs, 16, "hello"]]).e; return new Inner(); } } diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/1-helpermemberexpressionfunction/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/1-helpermemberexpressionfunction/output.js index ba71d3393d976a..12f565f14ef303 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/1-helpermemberexpressionfunction/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/1-helpermemberexpressionfunction/output.js @@ -1,42 +1,36 @@ -function _toSetter(t, e, n) { e || (e = []); var r = e.length++; return Object.defineProperty({}, "_", { set: function (o) { e[r] = o, t.apply(n, e); } }); } -function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; } -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } -function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); } -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } var _arr = /*#__PURE__*/new WeakMap(); class D { constructor() { - _classPrivateFieldInitSpec(this, _arr, void 0); + babelHelpers.classPrivateFieldInitSpec(this, _arr, void 0); } f() { - for (const el of _classPrivateFieldGet(_arr, this)); + for (const el of babelHelpers.classPrivateFieldGet2(_arr, this)); } } var _p = /*#__PURE__*/new WeakMap(); class C { constructor() { - _classPrivateFieldInitSpec(this, _p, void 0); + babelHelpers.classPrivateFieldInitSpec(this, _p, void 0); } m() { - for (_toSetter(_classPrivateFieldSet, [_p, this])._ of []); + for (babelHelpers.toSetter(babelHelpers.classPrivateFieldSet2, [_p, this])._ of []); } } var _arr2 = /*#__PURE__*/new WeakMap(); class E { constructor() { - _classPrivateFieldInitSpec(this, _arr2, void 0); + babelHelpers.classPrivateFieldInitSpec(this, _arr2, void 0); } f() { - for (_toSetter(_classPrivateFieldSet, [_arr2, this])._ of [1, 2]); + for (babelHelpers.toSetter(babelHelpers.classPrivateFieldSet2, [_arr2, this])._ of [1, 2]); } } var _ar = /*#__PURE__*/new WeakMap(); class F { constructor() { - _classPrivateFieldInitSpec(this, _ar, void 0); + babelHelpers.classPrivateFieldInitSpec(this, _ar, void 0); } g() { - for (_toSetter(_classPrivateFieldSet, [_ar, this])._ in [1, 2, 3]); + for (babelHelpers.toSetter(babelHelpers.classPrivateFieldSet2, [_ar, this])._ in [1, 2, 3]); } } \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/assignment/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/assignment/output.js index e680ba54c50414..3ad3fee38701c7 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/assignment/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/assignment/output.js @@ -1,18 +1,13 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } -function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; } -function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); } -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } var _foo = /*#__PURE__*/new WeakMap(); class Foo { constructor() { - _classPrivateFieldInitSpec(this, _foo, 0); + babelHelpers.classPrivateFieldInitSpec(this, _foo, 0); } test(other) { var _other$obj; - _classPrivateFieldSet(_foo, this, _classPrivateFieldGet(_foo, this) + 1); - _classPrivateFieldSet(_foo, this, 2); - _classPrivateFieldSet(_foo, _other$obj = other.obj, _classPrivateFieldGet(_foo, _other$obj) + 1); - _classPrivateFieldSet(_foo, other.obj, 2); + babelHelpers.classPrivateFieldSet2(_foo, this, babelHelpers.classPrivateFieldGet2(_foo, this) + 1); + babelHelpers.classPrivateFieldSet2(_foo, this, 2); + babelHelpers.classPrivateFieldSet2(_foo, _other$obj = other.obj, babelHelpers.classPrivateFieldGet2(_foo, _other$obj) + 1); + babelHelpers.classPrivateFieldSet2(_foo, other.obj, 2); } } \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/call/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/call/output.js index 6025e3dda02273..9499464da47786 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/call/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/call/output.js @@ -1,17 +1,13 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } -function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); } -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } var _foo = /*#__PURE__*/new WeakMap(); class Foo { constructor() { - _classPrivateFieldInitSpec(this, _foo, function () { + babelHelpers.classPrivateFieldInitSpec(this, _foo, function () { return this; }); } test(other) { var _other$obj; - _classPrivateFieldGet(_foo, this).call(this); - _classPrivateFieldGet(_foo, _other$obj = other.obj).call(_other$obj); + babelHelpers.classPrivateFieldGet2(_foo, this).call(this); + babelHelpers.classPrivateFieldGet2(_foo, _other$obj = other.obj).call(_other$obj); } } \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/canonical/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/canonical/output.js index 2c20117b44c43a..b06a31c6bf19fe 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/canonical/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/canonical/output.js @@ -1,33 +1,28 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } -function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); } -function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; } -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } var _x = /*#__PURE__*/new WeakMap(); var _y = /*#__PURE__*/new WeakMap(); class Point { constructor(x = 0, y = 0) { - _classPrivateFieldInitSpec(this, _x, void 0); - _classPrivateFieldInitSpec(this, _y, void 0); - _classPrivateFieldSet(_x, this, +x); - _classPrivateFieldSet(_y, this, +y); + babelHelpers.classPrivateFieldInitSpec(this, _x, void 0); + babelHelpers.classPrivateFieldInitSpec(this, _y, void 0); + babelHelpers.classPrivateFieldSet2(_x, this, +x); + babelHelpers.classPrivateFieldSet2(_y, this, +y); } get x() { - return _classPrivateFieldGet(_x, this); + return babelHelpers.classPrivateFieldGet2(_x, this); } set x(value) { - _classPrivateFieldSet(_x, this, +value); + babelHelpers.classPrivateFieldSet2(_x, this, +value); } get y() { - return _classPrivateFieldGet(_y, this); + return babelHelpers.classPrivateFieldGet2(_y, this); } set y(value) { - _classPrivateFieldSet(_y, this, +value); + babelHelpers.classPrivateFieldSet2(_y, this, +value); } equals(p) { - return _classPrivateFieldGet(_x, this) === _classPrivateFieldGet(_x, p) && _classPrivateFieldGet(_y, this) === _classPrivateFieldGet(_y, p); + return babelHelpers.classPrivateFieldGet2(_x, this) === babelHelpers.classPrivateFieldGet2(_x, p) && babelHelpers.classPrivateFieldGet2(_y, this) === babelHelpers.classPrivateFieldGet2(_y, p); } toString() { - return `Point<${_classPrivateFieldGet(_x, this)},${_classPrivateFieldGet(_y, this)}>`; + return `Point<${babelHelpers.classPrivateFieldGet2(_x, this)},${babelHelpers.classPrivateFieldGet2(_y, this)}>`; } } \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/constructor-collision/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/constructor-collision/output.js index 767e185f71a63e..9bfeedf72b682b 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/constructor-collision/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/constructor-collision/output.js @@ -1,10 +1,8 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } var foo = "bar"; var _bar = /*#__PURE__*/new WeakMap(); class Foo { constructor() { - _classPrivateFieldInitSpec(this, _bar, foo); + babelHelpers.classPrivateFieldInitSpec(this, _bar, foo); var _foo = "foo"; } } \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/declaration-order/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/declaration-order/output.js index 508b7840f74143..775e33249a2aa5 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/declaration-order/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/declaration-order/output.js @@ -1,12 +1,8 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } -function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); } -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } var _x = /*#__PURE__*/new WeakMap(); class C { constructor() { - babelHelpers.defineProperty(this, "y", _classPrivateFieldGet(_x, this)); - _classPrivateFieldInitSpec(this, _x, void 0); + babelHelpers.defineProperty(this, "y", babelHelpers.classPrivateFieldGet2(_x, this)); + babelHelpers.classPrivateFieldInitSpec(this, _x, void 0); } } expect(() => { diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/derived-multiple-supers/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/derived-multiple-supers/output.js index a27344a6b9f030..1a097ba5d93258 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/derived-multiple-supers/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/derived-multiple-supers/output.js @@ -1,14 +1,12 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } var _bar = /*#__PURE__*/new WeakMap(); class Foo extends Bar { constructor() { if (condition) { super(); - _classPrivateFieldInitSpec(this, _bar, "foo"); + babelHelpers.classPrivateFieldInitSpec(this, _bar, "foo"); } else { super(); - _classPrivateFieldInitSpec(this, _bar, "foo"); + babelHelpers.classPrivateFieldInitSpec(this, _bar, "foo"); } } } \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/derived/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/derived/output.js index 7d2ae016354406..8e45743ee5c4d9 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/derived/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/derived/output.js @@ -1,15 +1,13 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } var _prop = /*#__PURE__*/new WeakMap(); class Foo { constructor() { - _classPrivateFieldInitSpec(this, _prop, "foo"); + babelHelpers.classPrivateFieldInitSpec(this, _prop, "foo"); } } var _prop2 = /*#__PURE__*/new WeakMap(); class Bar extends Foo { constructor(...args) { super(...args); - _classPrivateFieldInitSpec(this, _prop2, "bar"); + babelHelpers.classPrivateFieldInitSpec(this, _prop2, "bar"); } } \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/destructuring-array-pattern-1/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/destructuring-array-pattern-1/output.js index 3efb94f34e806a..ced23e458cb6d2 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/destructuring-array-pattern-1/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/destructuring-array-pattern-1/output.js @@ -1,14 +1,8 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } -function _toSetter(t, e, n) { e || (e = []); var r = e.length++; return Object.defineProperty({}, "_", { set: function (o) { e[r] = o, t.apply(n, e); } }); } -function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); } -function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; } -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } var _client = /*#__PURE__*/new WeakMap(); class Foo { constructor(props) { - _classPrivateFieldInitSpec(this, _client, void 0); - _classPrivateFieldSet(_client, this, 1); - [this.x = _classPrivateFieldGet(_client, this), _toSetter(_classPrivateFieldSet, [_client, this])._, this.y = _classPrivateFieldGet(_client, this)] = props; + babelHelpers.classPrivateFieldInitSpec(this, _client, void 0); + babelHelpers.classPrivateFieldSet2(_client, this, 1); + [this.x = babelHelpers.classPrivateFieldGet2(_client, this), babelHelpers.toSetter(babelHelpers.classPrivateFieldSet2, [_client, this])._, this.y = babelHelpers.classPrivateFieldGet2(_client, this)] = props; } } \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/destructuring-array-pattern-2/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/destructuring-array-pattern-2/output.js index db305454cc8a45..c4916ba76d322e 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/destructuring-array-pattern-2/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/destructuring-array-pattern-2/output.js @@ -1,12 +1,7 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } -function _toSetter(t, e, n) { e || (e = []); var r = e.length++; return Object.defineProperty({}, "_", { set: function (o) { e[r] = o, t.apply(n, e); } }); } -function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; } -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } var _client = /*#__PURE__*/new WeakMap(); class Foo { constructor(props) { - _classPrivateFieldInitSpec(this, _client, void 0); - [x, ..._toSetter(_classPrivateFieldSet, [_client, this])._] = props; + babelHelpers.classPrivateFieldInitSpec(this, _client, void 0); + [x, ...babelHelpers.toSetter(babelHelpers.classPrivateFieldSet2, [_client, this])._] = props; } } \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/destructuring-array-pattern-3/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/destructuring-array-pattern-3/output.js index 9671b76bd533a0..9446c6f655fe43 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/destructuring-array-pattern-3/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/destructuring-array-pattern-3/output.js @@ -1,12 +1,7 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } -function _toSetter(t, e, n) { e || (e = []); var r = e.length++; return Object.defineProperty({}, "_", { set: function (o) { e[r] = o, t.apply(n, e); } }); } -function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; } -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } var _client = /*#__PURE__*/new WeakMap(); class Foo { constructor(props) { - _classPrivateFieldInitSpec(this, _client, void 0); - [_toSetter(_classPrivateFieldSet, [_client, this])._ = 5] = props; + babelHelpers.classPrivateFieldInitSpec(this, _client, void 0); + [babelHelpers.toSetter(babelHelpers.classPrivateFieldSet2, [_client, this])._ = 5] = props; } } \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/destructuring-array-pattern/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/destructuring-array-pattern/output.js index 3e049a0cc37fbe..e236ac853afcc7 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/destructuring-array-pattern/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/destructuring-array-pattern/output.js @@ -1,12 +1,7 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } -function _toSetter(t, e, n) { e || (e = []); var r = e.length++; return Object.defineProperty({}, "_", { set: function (o) { e[r] = o, t.apply(n, e); } }); } -function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; } -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } var _client = /*#__PURE__*/new WeakMap(); class Foo { constructor(props) { - _classPrivateFieldInitSpec(this, _client, void 0); - [_toSetter(_classPrivateFieldSet, [_client, this])._] = props; + babelHelpers.classPrivateFieldInitSpec(this, _client, void 0); + [babelHelpers.toSetter(babelHelpers.classPrivateFieldSet2, [_client, this])._] = props; } } \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/destructuring-object-pattern-1/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/destructuring-object-pattern-1/output.js index 2ebff046dce05f..3882c33e07a0a0 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/destructuring-object-pattern-1/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/destructuring-object-pattern-1/output.js @@ -1,18 +1,12 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } -function _toSetter(t, e, n) { e || (e = []); var r = e.length++; return Object.defineProperty({}, "_", { set: function (o) { e[r] = o, t.apply(n, e); } }); } -function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); } -function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; } -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } var _client = /*#__PURE__*/new WeakMap(); class Foo { constructor(props) { - _classPrivateFieldInitSpec(this, _client, void 0); - _classPrivateFieldSet(_client, this, 'foo'); + babelHelpers.classPrivateFieldInitSpec(this, _client, void 0); + babelHelpers.classPrivateFieldSet2(_client, this, 'foo'); ({ - x: this.x = _classPrivateFieldGet(_client, this), - y: _toSetter(_classPrivateFieldSet, [_client, this])._, - z: this.z = _classPrivateFieldGet(_client, this) + x: this.x = babelHelpers.classPrivateFieldGet2(_client, this), + y: babelHelpers.toSetter(babelHelpers.classPrivateFieldSet2, [_client, this])._, + z: this.z = babelHelpers.classPrivateFieldGet2(_client, this) } = props); } } \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/destructuring-object-pattern-2/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/destructuring-object-pattern-2/output.js index 269265c2e7005c..841317fbe2576e 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/destructuring-object-pattern-2/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/destructuring-object-pattern-2/output.js @@ -1,15 +1,10 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } -function _toSetter(t, e, n) { e || (e = []); var r = e.length++; return Object.defineProperty({}, "_", { set: function (o) { e[r] = o, t.apply(n, e); } }); } -function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; } -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } var _client = /*#__PURE__*/new WeakMap(); class Foo { constructor(props) { - _classPrivateFieldInitSpec(this, _client, void 0); + babelHelpers.classPrivateFieldInitSpec(this, _client, void 0); ({ x, - ..._toSetter(_classPrivateFieldSet, [_client, this])._ + ...babelHelpers.toSetter(babelHelpers.classPrivateFieldSet2, [_client, this])._ } = props); } } \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/destructuring-object-pattern-3/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/destructuring-object-pattern-3/output.js index b59c93cae099c3..9412161b919654 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/destructuring-object-pattern-3/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/destructuring-object-pattern-3/output.js @@ -1,14 +1,9 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } -function _toSetter(t, e, n) { e || (e = []); var r = e.length++; return Object.defineProperty({}, "_", { set: function (o) { e[r] = o, t.apply(n, e); } }); } -function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; } -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } var _client = /*#__PURE__*/new WeakMap(); class Foo { constructor(props) { - _classPrivateFieldInitSpec(this, _client, void 0); + babelHelpers.classPrivateFieldInitSpec(this, _client, void 0); ({ - x: _toSetter(_classPrivateFieldSet, [_client, this])._ = 5 + x: babelHelpers.toSetter(babelHelpers.classPrivateFieldSet2, [_client, this])._ = 5 } = props); } } \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/destructuring-object-pattern/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/destructuring-object-pattern/output.js index d57904c667b7b8..3bbaa033eb9bb8 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/destructuring-object-pattern/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/destructuring-object-pattern/output.js @@ -1,14 +1,9 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } -function _toSetter(t, e, n) { e || (e = []); var r = e.length++; return Object.defineProperty({}, "_", { set: function (o) { e[r] = o, t.apply(n, e); } }); } -function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; } -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } var _client = /*#__PURE__*/new WeakMap(); class Foo { constructor(props) { - _classPrivateFieldInitSpec(this, _client, void 0); + babelHelpers.classPrivateFieldInitSpec(this, _client, void 0); ({ - client: _toSetter(_classPrivateFieldSet, [_client, this])._ + client: babelHelpers.toSetter(babelHelpers.classPrivateFieldSet2, [_client, this])._ } = props); } } \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/extracted-this/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/extracted-this/output.js index 30cb9fa08443e9..19640ff824c656 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/extracted-this/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/extracted-this/output.js @@ -1,11 +1,9 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } var foo = "bar"; var _bar = /*#__PURE__*/new WeakMap(); var _baz = /*#__PURE__*/new WeakMap(); class Foo { constructor(_foo) { - _classPrivateFieldInitSpec(this, _bar, this); - _classPrivateFieldInitSpec(this, _baz, foo); + babelHelpers.classPrivateFieldInitSpec(this, _bar, this); + babelHelpers.classPrivateFieldInitSpec(this, _baz, foo); } } \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/foobar/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/foobar/output.js index 7d784491837d17..8168e365ee3c49 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/foobar/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/foobar/output.js @@ -1,10 +1,8 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } var _scopedFunctionWithThis = /*#__PURE__*/new WeakMap(); class Child extends Parent { constructor() { super(); - _classPrivateFieldInitSpec(this, _scopedFunctionWithThis, () => { + babelHelpers.classPrivateFieldInitSpec(this, _scopedFunctionWithThis, () => { this.name = {}; }); } diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/instance-undefined/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/instance-undefined/output.js index 09bdc9f6368944..3a2bf7570f48a3 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/instance-undefined/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/instance-undefined/output.js @@ -1,8 +1,6 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } var _bar = /*#__PURE__*/new WeakMap(); class Foo { constructor() { - _classPrivateFieldInitSpec(this, _bar, void 0); + babelHelpers.classPrivateFieldInitSpec(this, _bar, void 0); } } \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/instance/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/instance/output.js index 8b1bf03e08c2b8..1f95011d97bd9b 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/instance/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/instance/output.js @@ -1,8 +1,6 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } var _bar = /*#__PURE__*/new WeakMap(); class Foo { constructor() { - _classPrivateFieldInitSpec(this, _bar, "foo"); + babelHelpers.classPrivateFieldInitSpec(this, _bar, "foo"); } } \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/logical-assignment/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/logical-assignment/output.js index 2778f990e5088d..69529acdde5db7 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/logical-assignment/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/logical-assignment/output.js @@ -1,25 +1,20 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } -function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; } -function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); } -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } var _nullish = /*#__PURE__*/new WeakMap(); var _and = /*#__PURE__*/new WeakMap(); var _or = /*#__PURE__*/new WeakMap(); class Foo { constructor() { - _classPrivateFieldInitSpec(this, _nullish, 0); - _classPrivateFieldInitSpec(this, _and, 0); - _classPrivateFieldInitSpec(this, _or, 0); + babelHelpers.classPrivateFieldInitSpec(this, _nullish, 0); + babelHelpers.classPrivateFieldInitSpec(this, _and, 0); + babelHelpers.classPrivateFieldInitSpec(this, _or, 0); } self() { return this; } test() { var _this$self; - _classPrivateFieldGet(_nullish, this) ?? _classPrivateFieldSet(_nullish, this, 42); - _classPrivateFieldGet(_and, this) && _classPrivateFieldSet(_and, this, 0); - _classPrivateFieldGet(_or, this) || _classPrivateFieldSet(_or, this, 0); - _classPrivateFieldGet(_nullish, _this$self = this.self()) ?? _classPrivateFieldSet(_nullish, _this$self, 42); + babelHelpers.classPrivateFieldGet2(_nullish, this) ?? babelHelpers.classPrivateFieldSet2(_nullish, this, 42); + babelHelpers.classPrivateFieldGet2(_and, this) && babelHelpers.classPrivateFieldSet2(_and, this, 0); + babelHelpers.classPrivateFieldGet2(_or, this) || babelHelpers.classPrivateFieldSet2(_or, this, 0); + babelHelpers.classPrivateFieldGet2(_nullish, _this$self = this.self()) ?? babelHelpers.classPrivateFieldSet2(_nullish, _this$self, 42); } } \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/multiple/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/multiple/output.js index 7b4863d17108f7..f2672a8f1951a8 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/multiple/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/multiple/output.js @@ -1,12 +1,8 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } -function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); } -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } var _x = /*#__PURE__*/new WeakMap(); var _y = /*#__PURE__*/new WeakMap(); class Foo { constructor() { - _classPrivateFieldInitSpec(this, _x, 0); - _classPrivateFieldInitSpec(this, _y, _classPrivateFieldGet(_x, this)); + babelHelpers.classPrivateFieldInitSpec(this, _x, 0); + babelHelpers.classPrivateFieldInitSpec(this, _y, babelHelpers.classPrivateFieldGet2(_x, this)); } } \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/native-classes/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/native-classes/output.js index 6a6fbe41749d02..940c03f3df0464 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/native-classes/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/native-classes/output.js @@ -1,17 +1,13 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } -function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); } -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } var _bar = /*#__PURE__*/new WeakMap(); class Foo { constructor() { - _classPrivateFieldInitSpec(this, _bar, "bar"); + babelHelpers.classPrivateFieldInitSpec(this, _bar, "bar"); } static test() { return _foo._; } test() { - return _classPrivateFieldGet(_bar, this); + return babelHelpers.classPrivateFieldGet2(_bar, this); } } var _foo = { diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/nested-class-computed-redeclared/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/nested-class-computed-redeclared/output.js index 9a60823a0938db..01db877c5a5518 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/nested-class-computed-redeclared/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/nested-class-computed-redeclared/output.js @@ -1,22 +1,18 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } -function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); } -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } var _foo = /*#__PURE__*/new WeakMap(); class Foo { constructor() { - _classPrivateFieldInitSpec(this, _foo, 1); + babelHelpers.classPrivateFieldInitSpec(this, _foo, 1); } test() { - let _classPrivateFieldGet2; + let _babelHelpers$classPr; var _foo2 = /*#__PURE__*/new WeakMap(); - _classPrivateFieldGet2 = _classPrivateFieldGet(_foo2, this); + _babelHelpers$classPr = babelHelpers.classPrivateFieldGet2(_foo2, this); class Nested { constructor() { - _classPrivateFieldInitSpec(this, _foo2, 2); + babelHelpers.classPrivateFieldInitSpec(this, _foo2, 2); } - [_classPrivateFieldGet2]() {} + [_babelHelpers$classPr]() {} } - _classPrivateFieldGet(_foo, this); + babelHelpers.classPrivateFieldGet2(_foo, this); } } \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/nested-class-computed/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/nested-class-computed/output.js index 92679f541f36e6..c66f921737d593 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/nested-class-computed/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/nested-class-computed/output.js @@ -1,16 +1,12 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } -function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); } -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } var _foo = /*#__PURE__*/new WeakMap(); class Foo { constructor() { - _classPrivateFieldInitSpec(this, _foo, 1); + babelHelpers.classPrivateFieldInitSpec(this, _foo, 1); } test() { class Nested { - [_classPrivateFieldGet(_foo, this)]() {} + [babelHelpers.classPrivateFieldGet2(_foo, this)]() {} } - _classPrivateFieldGet(_foo, this); + babelHelpers.classPrivateFieldGet2(_foo, this); } } \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/nested-class-extends-computed-redeclared/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/nested-class-extends-computed-redeclared/output.js index e79274ce30782d..cbb4eddbabc452 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/nested-class-extends-computed-redeclared/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/nested-class-extends-computed-redeclared/output.js @@ -1,25 +1,21 @@ -function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); } -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } var _foo = /*#__PURE__*/new WeakMap(); class Foo { constructor() { - _classPrivateFieldInitSpec(this, _foo, 1); + babelHelpers.classPrivateFieldInitSpec(this, _foo, 1); } test() { var _foo3; - let _classPrivateFieldGet2; + let _babelHelpers$classPr; var _foo2 = /*#__PURE__*/new WeakMap(); - class Nested extends (_foo3 = /*#__PURE__*/new WeakMap(), _classPrivateFieldGet2 = _classPrivateFieldGet(_foo3, this), class { + class Nested extends (_foo3 = /*#__PURE__*/new WeakMap(), _babelHelpers$classPr = babelHelpers.classPrivateFieldGet2(_foo3, this), class { constructor() { - _classPrivateFieldInitSpec(this, _foo3, 2); - babelHelpers.defineProperty(this, _classPrivateFieldGet2, 2); + babelHelpers.classPrivateFieldInitSpec(this, _foo3, 2); + babelHelpers.defineProperty(this, _babelHelpers$classPr, 2); } }) { constructor(...args) { super(...args); - _classPrivateFieldInitSpec(this, _foo2, 3); + babelHelpers.classPrivateFieldInitSpec(this, _foo2, 3); } } } diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/nested-class-extends-computed/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/nested-class-extends-computed/output.js index 449750437a653c..6938176f954edc 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/nested-class-extends-computed/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/nested-class-extends-computed/output.js @@ -1,23 +1,19 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } -function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); } -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } var _foo = /*#__PURE__*/new WeakMap(); class Foo { constructor() { - _classPrivateFieldInitSpec(this, _foo, 1); + babelHelpers.classPrivateFieldInitSpec(this, _foo, 1); } test() { - let _classPrivateFieldGet2; + let _babelHelpers$classPr; var _foo2 = /*#__PURE__*/new WeakMap(); - class Nested extends (_classPrivateFieldGet2 = _classPrivateFieldGet(_foo, this), class { + class Nested extends (_babelHelpers$classPr = babelHelpers.classPrivateFieldGet2(_foo, this), class { constructor() { - babelHelpers.defineProperty(this, _classPrivateFieldGet2, 2); + babelHelpers.defineProperty(this, _babelHelpers$classPr, 2); } }) { constructor(...args) { super(...args); - _classPrivateFieldInitSpec(this, _foo2, 3); + babelHelpers.classPrivateFieldInitSpec(this, _foo2, 3); } } } diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/nested-class-other-redeclared/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/nested-class-other-redeclared/output.js index ce82f481e31a32..5e4fa7b7c10fc3 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/nested-class-other-redeclared/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/nested-class-other-redeclared/output.js @@ -1,26 +1,22 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } -function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); } -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } var _foo = /*#__PURE__*/new WeakMap(); var _bar = /*#__PURE__*/new WeakMap(); class Foo { constructor() { - _classPrivateFieldInitSpec(this, _foo, 1); - _classPrivateFieldInitSpec(this, _bar, 1); + babelHelpers.classPrivateFieldInitSpec(this, _foo, 1); + babelHelpers.classPrivateFieldInitSpec(this, _bar, 1); } test() { var _bar2 = /*#__PURE__*/new WeakMap(); class Nested { constructor() { - _classPrivateFieldInitSpec(this, _bar2, 2); + babelHelpers.classPrivateFieldInitSpec(this, _bar2, 2); } test() { - _classPrivateFieldGet(_foo, this); - _classPrivateFieldGet(_bar2, this); + babelHelpers.classPrivateFieldGet2(_foo, this); + babelHelpers.classPrivateFieldGet2(_bar2, this); } } - _classPrivateFieldGet(_foo, this); - _classPrivateFieldGet(_bar, this); + babelHelpers.classPrivateFieldGet2(_foo, this); + babelHelpers.classPrivateFieldGet2(_bar, this); } } \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/nested-class-redeclared/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/nested-class-redeclared/output.js index a55a43f5c0181c..f49de66644ed1e 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/nested-class-redeclared/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/nested-class-redeclared/output.js @@ -1,22 +1,18 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } -function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); } -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } var _foo = /*#__PURE__*/new WeakMap(); class Foo { constructor() { - _classPrivateFieldInitSpec(this, _foo, 1); + babelHelpers.classPrivateFieldInitSpec(this, _foo, 1); } test() { var _foo2 = /*#__PURE__*/new WeakMap(); class Nested { constructor() { - _classPrivateFieldInitSpec(this, _foo2, 2); + babelHelpers.classPrivateFieldInitSpec(this, _foo2, 2); } test() { - _classPrivateFieldGet(_foo2, this); + babelHelpers.classPrivateFieldGet2(_foo2, this); } } - _classPrivateFieldGet(_foo, this); + babelHelpers.classPrivateFieldGet2(_foo, this); } } \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/nested-class/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/nested-class/output.js index 3d7fcf2cf13266..07fb8a228ed562 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/nested-class/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/nested-class/output.js @@ -1,18 +1,14 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } -function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); } -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } var _foo = /*#__PURE__*/new WeakMap(); class Foo { constructor() { - _classPrivateFieldInitSpec(this, _foo, 1); + babelHelpers.classPrivateFieldInitSpec(this, _foo, 1); } test() { class Nested { test() { - _classPrivateFieldGet(_foo, this); + babelHelpers.classPrivateFieldGet2(_foo, this); } } - _classPrivateFieldGet(_foo, this); + babelHelpers.classPrivateFieldGet2(_foo, this); } } \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-before-member-call-with-transform/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-before-member-call-with-transform/output.js index 632a2bf46dd9e2..071dc61bff5db6 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-before-member-call-with-transform/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-before-member-call-with-transform/output.js @@ -1,11 +1,10 @@ var _Foo; -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } class Foo { static getSelf() { return this; } static test() { - var _o$Foo, _o$Foo2, _o$Foo3, _deep$very$o, _deep$very$o$Foo, _deep$very$o2, _deep$very$o2$Foo, _deep$very$o3, _deep$very$o3$Foo, _assertClassBrand$_, _assertClassBrand$_$s, _ref, _ref$self, _ref2, _ref2$self, _self2, _self2$self, _assertClassBrand$_$g, _assertClassBrand$_2, _ref3, _ref3$call, _ref4, _ref4$getSelf, _getSelf, _ref5, _getSelf$call, _ref6, _ref6$self, _assertClassBrand$_3, _call, _call$self, _getSelf2, _getSelf2$self, _getSelf3, _getSelf3$self, _fn$Foo, _fn$Foo2, _fn$Foo3, _fnDeep$very$o, _fnDeep$very$o$Foo, _fnDeep$very$o2, _fnDeep$very$o2$Foo, _fnDeep$very$o3, _fnDeep$very$o3$Foo, _assertClassBrand$_4, _assertClassBrand$_$s2, _ref7, _ref7$self, _ref8, _ref8$self, _self3, _self3$self, _assertClassBrand$_$g2, _assertClassBrand$_5, _ref9, _ref9$call, _ref10, _ref10$getSelf, _getSelf4, _ref11, _getSelf4$call, _ref12, _ref12$self, _assertClassBrand$_6, _call2, _call2$self, _getSelf5, _getSelf5$self, _getSelf6, _getSelf6$self, _ref13, _ref14, _ref15, _ref16, _ref17, _ref17$getSelf, _ref18, _ref19, _ref20, _ref21, _ref22, _ref22$getSelf; + var _o$Foo, _o$Foo2, _o$Foo3, _deep$very$o, _deep$very$o$Foo, _deep$very$o2, _deep$very$o2$Foo, _deep$very$o3, _deep$very$o3$Foo, _babelHelpers$assertC, _babelHelpers$assertC2, _ref, _ref$self, _ref2, _ref2$self, _self2, _self2$self, _babelHelpers$assertC3, _babelHelpers$assertC4, _ref3, _ref3$call, _ref4, _ref4$getSelf, _getSelf, _ref5, _getSelf$call, _ref6, _ref6$self, _babelHelpers$assertC5, _call, _call$self, _getSelf2, _getSelf2$self, _getSelf3, _getSelf3$self, _fn$Foo, _fn$Foo2, _fn$Foo3, _fnDeep$very$o, _fnDeep$very$o$Foo, _fnDeep$very$o2, _fnDeep$very$o2$Foo, _fnDeep$very$o3, _fnDeep$very$o3$Foo, _babelHelpers$assertC6, _babelHelpers$assertC7, _ref7, _ref7$self, _ref8, _ref8$self, _self3, _self3$self, _babelHelpers$assertC8, _babelHelpers$assertC9, _ref9, _ref9$call, _ref10, _ref10$getSelf, _getSelf4, _ref11, _getSelf4$call, _ref12, _ref12$self, _babelHelpers$assertC10, _call2, _call2$self, _getSelf5, _getSelf5$self, _getSelf6, _getSelf6$self, _ref13, _ref14, _ref15, _ref16, _ref17, _ref17$getSelf, _ref18, _ref19, _ref20, _ref21, _ref22, _ref22$getSelf; const o = { Foo: Foo }; @@ -20,44 +19,44 @@ class Foo { function fnDeep() { return deep; } - o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _o$Foo = o.Foo, _m)._.call(_o$Foo); - o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _o$Foo2 = o.Foo, _m)._.call(_o$Foo2).toString; - o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _o$Foo3 = o.Foo, _m)._.call(_o$Foo3).toString(); - (_deep$very$o = deep === null || deep === void 0 ? void 0 : deep.very.o) === null || _deep$very$o === void 0 ? void 0 : _assertClassBrand(Foo, _deep$very$o$Foo = _deep$very$o.Foo, _m)._.call(_deep$very$o$Foo); - (_deep$very$o2 = deep === null || deep === void 0 ? void 0 : deep.very.o) === null || _deep$very$o2 === void 0 ? void 0 : _assertClassBrand(Foo, _deep$very$o2$Foo = _deep$very$o2.Foo, _m)._.call(_deep$very$o2$Foo).toString; - (_deep$very$o3 = deep === null || deep === void 0 ? void 0 : deep.very.o) === null || _deep$very$o3 === void 0 ? void 0 : _assertClassBrand(Foo, _deep$very$o3$Foo = _deep$very$o3.Foo, _m)._.call(_deep$very$o3$Foo).toString(); - o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand$_ = _assertClassBrand(Foo, o.Foo, _self)._, _m)._.call(_assertClassBrand$_); - o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand$_$s = _assertClassBrand(Foo, o.Foo, _self)._.self, _m)._.call(_assertClassBrand$_$s); - (_ref = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref === void 0 ? void 0 : _assertClassBrand(Foo, _ref$self = _ref.self, _m)._.call(_ref$self); - (_ref2 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._.self) === null || _ref2 === void 0 ? void 0 : _assertClassBrand(Foo, _ref2$self = _ref2.self, _m)._.call(_ref2$self); - (_self2 = (_ref13 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref13 === void 0 ? void 0 : _ref13.self) === null || _self2 === void 0 ? void 0 : _assertClassBrand(Foo, _self2$self = _self2.self, _m)._.call(_self2$self); - o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand$_$g = _assertClassBrand(Foo, o.Foo, _self)._.getSelf(), _m)._.call(_assertClassBrand$_$g); - (_ref3 = o === null || o === void 0 ? void 0 : (_assertClassBrand$_2 = _assertClassBrand(Foo, o.Foo, _self)._).getSelf) === null || _ref3 === void 0 ? void 0 : _assertClassBrand(Foo, _ref3$call = _ref3.call(_assertClassBrand$_2), _m)._.call(_ref3$call); - (_ref4 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref4 === void 0 ? void 0 : _assertClassBrand(Foo, _ref4$getSelf = _ref4.getSelf(), _m)._.call(_ref4$getSelf); - (_getSelf = (_ref14 = _ref5 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref14 === void 0 ? void 0 : _ref14.getSelf) === null || _getSelf === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf$call = _getSelf.call(_ref5), _m)._.call(_getSelf$call); - (_ref6 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._.getSelf()) === null || _ref6 === void 0 ? void 0 : _assertClassBrand(Foo, _ref6$self = _ref6.self, _m)._.call(_ref6$self); - (_call = (_ref15 = o === null || o === void 0 ? void 0 : (_assertClassBrand$_3 = _assertClassBrand(Foo, o.Foo, _self)._).getSelf) === null || _ref15 === void 0 ? void 0 : _ref15.call(_assertClassBrand$_3)) === null || _call === void 0 ? void 0 : _assertClassBrand(Foo, _call$self = _call.self, _m)._.call(_call$self); - (_getSelf2 = (_ref16 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref16 === void 0 ? void 0 : _ref16.getSelf()) === null || _getSelf2 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf2$self = _getSelf2.self, _m)._.call(_getSelf2$self); - (_getSelf3 = (_ref17 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref17 === void 0 || (_ref17$getSelf = _ref17.getSelf) === null || _ref17$getSelf === void 0 ? void 0 : _ref17$getSelf.call(_ref17)) === null || _getSelf3 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf3$self = _getSelf3.self, _m)._.call(_getSelf3$self); - fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, _fn$Foo = fn().Foo, _m)._.call(_fn$Foo); - fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, _fn$Foo2 = fn().Foo, _m)._.call(_fn$Foo2).toString; - fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, _fn$Foo3 = fn().Foo, _m)._.call(_fn$Foo3).toString(); - (_fnDeep$very$o = fnDeep === null || fnDeep === void 0 ? void 0 : fnDeep().very.o) === null || _fnDeep$very$o === void 0 ? void 0 : _assertClassBrand(Foo, _fnDeep$very$o$Foo = _fnDeep$very$o.Foo, _m)._.call(_fnDeep$very$o$Foo); - (_fnDeep$very$o2 = fnDeep === null || fnDeep === void 0 ? void 0 : fnDeep().very.o) === null || _fnDeep$very$o2 === void 0 ? void 0 : _assertClassBrand(Foo, _fnDeep$very$o2$Foo = _fnDeep$very$o2.Foo, _m)._.call(_fnDeep$very$o2$Foo).toString; - (_fnDeep$very$o3 = fnDeep === null || fnDeep === void 0 ? void 0 : fnDeep().very.o) === null || _fnDeep$very$o3 === void 0 ? void 0 : _assertClassBrand(Foo, _fnDeep$very$o3$Foo = _fnDeep$very$o3.Foo, _m)._.call(_fnDeep$very$o3$Foo).toString(); - fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand$_4 = _assertClassBrand(Foo, fn().Foo, _self)._, _m)._.call(_assertClassBrand$_4); - fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand$_$s2 = _assertClassBrand(Foo, fn().Foo, _self)._.self, _m)._.call(_assertClassBrand$_$s2); - (_ref7 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref7 === void 0 ? void 0 : _assertClassBrand(Foo, _ref7$self = _ref7.self, _m)._.call(_ref7$self); - (_ref8 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._.self) === null || _ref8 === void 0 ? void 0 : _assertClassBrand(Foo, _ref8$self = _ref8.self, _m)._.call(_ref8$self); - (_self3 = (_ref18 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref18 === void 0 ? void 0 : _ref18.self) === null || _self3 === void 0 ? void 0 : _assertClassBrand(Foo, _self3$self = _self3.self, _m)._.call(_self3$self); - fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand$_$g2 = _assertClassBrand(Foo, fn().Foo, _self)._.getSelf(), _m)._.call(_assertClassBrand$_$g2); - (_ref9 = fn === null || fn === void 0 ? void 0 : (_assertClassBrand$_5 = _assertClassBrand(Foo, fn().Foo, _self)._).getSelf) === null || _ref9 === void 0 ? void 0 : _assertClassBrand(Foo, _ref9$call = _ref9.call(_assertClassBrand$_5), _m)._.call(_ref9$call); - (_ref10 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref10 === void 0 ? void 0 : _assertClassBrand(Foo, _ref10$getSelf = _ref10.getSelf(), _m)._.call(_ref10$getSelf); - (_getSelf4 = (_ref19 = _ref11 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref19 === void 0 ? void 0 : _ref19.getSelf) === null || _getSelf4 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf4$call = _getSelf4.call(_ref11), _m)._.call(_getSelf4$call); - (_ref12 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._.getSelf()) === null || _ref12 === void 0 ? void 0 : _assertClassBrand(Foo, _ref12$self = _ref12.self, _m)._.call(_ref12$self); - (_call2 = (_ref20 = fn === null || fn === void 0 ? void 0 : (_assertClassBrand$_6 = _assertClassBrand(Foo, fn().Foo, _self)._).getSelf) === null || _ref20 === void 0 ? void 0 : _ref20.call(_assertClassBrand$_6)) === null || _call2 === void 0 ? void 0 : _assertClassBrand(Foo, _call2$self = _call2.self, _m)._.call(_call2$self); - (_getSelf5 = (_ref21 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref21 === void 0 ? void 0 : _ref21.getSelf()) === null || _getSelf5 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf5$self = _getSelf5.self, _m)._.call(_getSelf5$self); - (_getSelf6 = (_ref22 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref22 === void 0 || (_ref22$getSelf = _ref22.getSelf) === null || _ref22$getSelf === void 0 ? void 0 : _ref22$getSelf.call(_ref22)) === null || _getSelf6 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf6$self = _getSelf6.self, _m)._.call(_getSelf6$self); + o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _o$Foo = o.Foo, _m)._.call(_o$Foo); + o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _o$Foo2 = o.Foo, _m)._.call(_o$Foo2).toString; + o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _o$Foo3 = o.Foo, _m)._.call(_o$Foo3).toString(); + (_deep$very$o = deep === null || deep === void 0 ? void 0 : deep.very.o) === null || _deep$very$o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _deep$very$o$Foo = _deep$very$o.Foo, _m)._.call(_deep$very$o$Foo); + (_deep$very$o2 = deep === null || deep === void 0 ? void 0 : deep.very.o) === null || _deep$very$o2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _deep$very$o2$Foo = _deep$very$o2.Foo, _m)._.call(_deep$very$o2$Foo).toString; + (_deep$very$o3 = deep === null || deep === void 0 ? void 0 : deep.very.o) === null || _deep$very$o3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _deep$very$o3$Foo = _deep$very$o3.Foo, _m)._.call(_deep$very$o3$Foo).toString(); + o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _babelHelpers$assertC = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._, _m)._.call(_babelHelpers$assertC); + o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _babelHelpers$assertC2 = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.self, _m)._.call(_babelHelpers$assertC2); + (_ref = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref$self = _ref.self, _m)._.call(_ref$self); + (_ref2 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.self) === null || _ref2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref2$self = _ref2.self, _m)._.call(_ref2$self); + (_self2 = (_ref13 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref13 === void 0 ? void 0 : _ref13.self) === null || _self2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self2$self = _self2.self, _m)._.call(_self2$self); + o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _babelHelpers$assertC3 = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.getSelf(), _m)._.call(_babelHelpers$assertC3); + (_ref3 = o === null || o === void 0 ? void 0 : (_babelHelpers$assertC4 = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._).getSelf) === null || _ref3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref3$call = _ref3.call(_babelHelpers$assertC4), _m)._.call(_ref3$call); + (_ref4 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref4 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref4$getSelf = _ref4.getSelf(), _m)._.call(_ref4$getSelf); + (_getSelf = (_ref14 = _ref5 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref14 === void 0 ? void 0 : _ref14.getSelf) === null || _getSelf === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf$call = _getSelf.call(_ref5), _m)._.call(_getSelf$call); + (_ref6 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.getSelf()) === null || _ref6 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref6$self = _ref6.self, _m)._.call(_ref6$self); + (_call = (_ref15 = o === null || o === void 0 ? void 0 : (_babelHelpers$assertC5 = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._).getSelf) === null || _ref15 === void 0 ? void 0 : _ref15.call(_babelHelpers$assertC5)) === null || _call === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _call$self = _call.self, _m)._.call(_call$self); + (_getSelf2 = (_ref16 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref16 === void 0 ? void 0 : _ref16.getSelf()) === null || _getSelf2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf2$self = _getSelf2.self, _m)._.call(_getSelf2$self); + (_getSelf3 = (_ref17 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref17 === void 0 || (_ref17$getSelf = _ref17.getSelf) === null || _ref17$getSelf === void 0 ? void 0 : _ref17$getSelf.call(_ref17)) === null || _getSelf3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf3$self = _getSelf3.self, _m)._.call(_getSelf3$self); + fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fn$Foo = fn().Foo, _m)._.call(_fn$Foo); + fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fn$Foo2 = fn().Foo, _m)._.call(_fn$Foo2).toString; + fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fn$Foo3 = fn().Foo, _m)._.call(_fn$Foo3).toString(); + (_fnDeep$very$o = fnDeep === null || fnDeep === void 0 ? void 0 : fnDeep().very.o) === null || _fnDeep$very$o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fnDeep$very$o$Foo = _fnDeep$very$o.Foo, _m)._.call(_fnDeep$very$o$Foo); + (_fnDeep$very$o2 = fnDeep === null || fnDeep === void 0 ? void 0 : fnDeep().very.o) === null || _fnDeep$very$o2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fnDeep$very$o2$Foo = _fnDeep$very$o2.Foo, _m)._.call(_fnDeep$very$o2$Foo).toString; + (_fnDeep$very$o3 = fnDeep === null || fnDeep === void 0 ? void 0 : fnDeep().very.o) === null || _fnDeep$very$o3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fnDeep$very$o3$Foo = _fnDeep$very$o3.Foo, _m)._.call(_fnDeep$very$o3$Foo).toString(); + fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _babelHelpers$assertC6 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._, _m)._.call(_babelHelpers$assertC6); + fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _babelHelpers$assertC7 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.self, _m)._.call(_babelHelpers$assertC7); + (_ref7 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref7 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref7$self = _ref7.self, _m)._.call(_ref7$self); + (_ref8 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.self) === null || _ref8 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref8$self = _ref8.self, _m)._.call(_ref8$self); + (_self3 = (_ref18 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref18 === void 0 ? void 0 : _ref18.self) === null || _self3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self3$self = _self3.self, _m)._.call(_self3$self); + fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _babelHelpers$assertC8 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.getSelf(), _m)._.call(_babelHelpers$assertC8); + (_ref9 = fn === null || fn === void 0 ? void 0 : (_babelHelpers$assertC9 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._).getSelf) === null || _ref9 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref9$call = _ref9.call(_babelHelpers$assertC9), _m)._.call(_ref9$call); + (_ref10 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref10 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref10$getSelf = _ref10.getSelf(), _m)._.call(_ref10$getSelf); + (_getSelf4 = (_ref19 = _ref11 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref19 === void 0 ? void 0 : _ref19.getSelf) === null || _getSelf4 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf4$call = _getSelf4.call(_ref11), _m)._.call(_getSelf4$call); + (_ref12 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.getSelf()) === null || _ref12 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref12$self = _ref12.self, _m)._.call(_ref12$self); + (_call2 = (_ref20 = fn === null || fn === void 0 ? void 0 : (_babelHelpers$assertC10 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._).getSelf) === null || _ref20 === void 0 ? void 0 : _ref20.call(_babelHelpers$assertC10)) === null || _call2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _call2$self = _call2.self, _m)._.call(_call2$self); + (_getSelf5 = (_ref21 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref21 === void 0 ? void 0 : _ref21.getSelf()) === null || _getSelf5 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf5$self = _getSelf5.self, _m)._.call(_getSelf5$self); + (_getSelf6 = (_ref22 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref22 === void 0 || (_ref22$getSelf = _ref22.getSelf) === null || _ref22$getSelf === void 0 ? void 0 : _ref22$getSelf.call(_ref22)) === null || _getSelf6 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf6$self = _getSelf6.self, _m)._.call(_getSelf6$self); } } _Foo = Foo; @@ -66,7 +65,7 @@ var _x = { }; var _m = { _: function () { - return _assertClassBrand(_Foo, this, _x)._; + return babelHelpers.assertClassBrand(_Foo, this, _x)._; } }; var _self = { diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-before-member-call/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-before-member-call/output.js index fd30926ea23d59..5f9a64920fd785 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-before-member-call/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-before-member-call/output.js @@ -1,11 +1,10 @@ var _Foo; -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } class Foo { static getSelf() { return this; } static test() { - var _o$Foo, _o$Foo2, _o$Foo3, _deep$very$o, _deep$very$o$Foo, _deep$very$o2, _deep$very$o2$Foo, _deep$very$o3, _deep$very$o3$Foo, _assertClassBrand$_, _assertClassBrand$_$s, _ref, _ref$self, _ref2, _ref2$self, _self2, _self2$self, _assertClassBrand$_$g, _assertClassBrand$_2, _ref3, _ref3$call, _ref4, _ref4$getSelf, _getSelf, _ref5, _getSelf$call, _ref6, _ref6$self, _assertClassBrand$_3, _call, _call$self, _getSelf2, _getSelf2$self, _getSelf3, _getSelf3$self, _fn$Foo, _fn$Foo2, _fn$Foo3, _fnDeep$very$o, _fnDeep$very$o$Foo, _fnDeep$very$o2, _fnDeep$very$o2$Foo, _fnDeep$very$o3, _fnDeep$very$o3$Foo, _assertClassBrand$_4, _assertClassBrand$_$s2, _ref7, _ref7$self, _ref8, _ref8$self, _self3, _self3$self, _assertClassBrand$_$g2, _assertClassBrand$_5, _ref9, _ref9$call, _ref10, _ref10$getSelf, _getSelf4, _ref11, _getSelf4$call, _ref12, _ref12$self, _assertClassBrand$_6, _call2, _call2$self, _getSelf5, _getSelf5$self, _getSelf6, _getSelf6$self; + var _o$Foo, _o$Foo2, _o$Foo3, _deep$very$o, _deep$very$o$Foo, _deep$very$o2, _deep$very$o2$Foo, _deep$very$o3, _deep$very$o3$Foo, _babelHelpers$assertC, _babelHelpers$assertC2, _ref, _ref$self, _ref2, _ref2$self, _self2, _self2$self, _babelHelpers$assertC3, _babelHelpers$assertC4, _ref3, _ref3$call, _ref4, _ref4$getSelf, _getSelf, _ref5, _getSelf$call, _ref6, _ref6$self, _babelHelpers$assertC5, _call, _call$self, _getSelf2, _getSelf2$self, _getSelf3, _getSelf3$self, _fn$Foo, _fn$Foo2, _fn$Foo3, _fnDeep$very$o, _fnDeep$very$o$Foo, _fnDeep$very$o2, _fnDeep$very$o2$Foo, _fnDeep$very$o3, _fnDeep$very$o3$Foo, _babelHelpers$assertC6, _babelHelpers$assertC7, _ref7, _ref7$self, _ref8, _ref8$self, _self3, _self3$self, _babelHelpers$assertC8, _babelHelpers$assertC9, _ref9, _ref9$call, _ref10, _ref10$getSelf, _getSelf4, _ref11, _getSelf4$call, _ref12, _ref12$self, _babelHelpers$assertC10, _call2, _call2$self, _getSelf5, _getSelf5$self, _getSelf6, _getSelf6$self; const o = { Foo: Foo }; @@ -20,44 +19,44 @@ class Foo { function fnDeep() { return deep; } - o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _o$Foo = o.Foo, _m)._.call(_o$Foo); - o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _o$Foo2 = o.Foo, _m)._.call(_o$Foo2).toString; - o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _o$Foo3 = o.Foo, _m)._.call(_o$Foo3).toString(); - (_deep$very$o = deep?.very.o) === null || _deep$very$o === void 0 ? void 0 : _assertClassBrand(Foo, _deep$very$o$Foo = _deep$very$o.Foo, _m)._.call(_deep$very$o$Foo); - (_deep$very$o2 = deep?.very.o) === null || _deep$very$o2 === void 0 ? void 0 : _assertClassBrand(Foo, _deep$very$o2$Foo = _deep$very$o2.Foo, _m)._.call(_deep$very$o2$Foo).toString; - (_deep$very$o3 = deep?.very.o) === null || _deep$very$o3 === void 0 ? void 0 : _assertClassBrand(Foo, _deep$very$o3$Foo = _deep$very$o3.Foo, _m)._.call(_deep$very$o3$Foo).toString(); - o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand$_ = _assertClassBrand(Foo, o.Foo, _self)._, _m)._.call(_assertClassBrand$_); - o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand$_$s = _assertClassBrand(Foo, o.Foo, _self)._.self, _m)._.call(_assertClassBrand$_$s); - (_ref = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref === void 0 ? void 0 : _assertClassBrand(Foo, _ref$self = _ref.self, _m)._.call(_ref$self); - (_ref2 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._.self) === null || _ref2 === void 0 ? void 0 : _assertClassBrand(Foo, _ref2$self = _ref2.self, _m)._.call(_ref2$self); - (_self2 = (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._)?.self) === null || _self2 === void 0 ? void 0 : _assertClassBrand(Foo, _self2$self = _self2.self, _m)._.call(_self2$self); - o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand$_$g = _assertClassBrand(Foo, o.Foo, _self)._.getSelf(), _m)._.call(_assertClassBrand$_$g); - (_ref3 = o === null || o === void 0 ? void 0 : (_assertClassBrand$_2 = _assertClassBrand(Foo, o.Foo, _self)._).getSelf) === null || _ref3 === void 0 ? void 0 : _assertClassBrand(Foo, _ref3$call = _ref3.call(_assertClassBrand$_2), _m)._.call(_ref3$call); - (_ref4 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref4 === void 0 ? void 0 : _assertClassBrand(Foo, _ref4$getSelf = _ref4.getSelf(), _m)._.call(_ref4$getSelf); - (_getSelf = (_ref5 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._)?.getSelf) === null || _getSelf === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf$call = _getSelf.call(_ref5), _m)._.call(_getSelf$call); - (_ref6 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._.getSelf()) === null || _ref6 === void 0 ? void 0 : _assertClassBrand(Foo, _ref6$self = _ref6.self, _m)._.call(_ref6$self); - (_call = (o === null || o === void 0 ? void 0 : (_assertClassBrand$_3 = _assertClassBrand(Foo, o.Foo, _self)._).getSelf)?.call(_assertClassBrand$_3)) === null || _call === void 0 ? void 0 : _assertClassBrand(Foo, _call$self = _call.self, _m)._.call(_call$self); - (_getSelf2 = (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._)?.getSelf()) === null || _getSelf2 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf2$self = _getSelf2.self, _m)._.call(_getSelf2$self); - (_getSelf3 = (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._)?.getSelf?.()) === null || _getSelf3 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf3$self = _getSelf3.self, _m)._.call(_getSelf3$self); - fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, _fn$Foo = fn().Foo, _m)._.call(_fn$Foo); - fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, _fn$Foo2 = fn().Foo, _m)._.call(_fn$Foo2).toString; - fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, _fn$Foo3 = fn().Foo, _m)._.call(_fn$Foo3).toString(); - (_fnDeep$very$o = fnDeep?.().very.o) === null || _fnDeep$very$o === void 0 ? void 0 : _assertClassBrand(Foo, _fnDeep$very$o$Foo = _fnDeep$very$o.Foo, _m)._.call(_fnDeep$very$o$Foo); - (_fnDeep$very$o2 = fnDeep?.().very.o) === null || _fnDeep$very$o2 === void 0 ? void 0 : _assertClassBrand(Foo, _fnDeep$very$o2$Foo = _fnDeep$very$o2.Foo, _m)._.call(_fnDeep$very$o2$Foo).toString; - (_fnDeep$very$o3 = fnDeep?.().very.o) === null || _fnDeep$very$o3 === void 0 ? void 0 : _assertClassBrand(Foo, _fnDeep$very$o3$Foo = _fnDeep$very$o3.Foo, _m)._.call(_fnDeep$very$o3$Foo).toString(); - fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand$_4 = _assertClassBrand(Foo, fn().Foo, _self)._, _m)._.call(_assertClassBrand$_4); - fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand$_$s2 = _assertClassBrand(Foo, fn().Foo, _self)._.self, _m)._.call(_assertClassBrand$_$s2); - (_ref7 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref7 === void 0 ? void 0 : _assertClassBrand(Foo, _ref7$self = _ref7.self, _m)._.call(_ref7$self); - (_ref8 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._.self) === null || _ref8 === void 0 ? void 0 : _assertClassBrand(Foo, _ref8$self = _ref8.self, _m)._.call(_ref8$self); - (_self3 = (fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._)?.self) === null || _self3 === void 0 ? void 0 : _assertClassBrand(Foo, _self3$self = _self3.self, _m)._.call(_self3$self); - fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand$_$g2 = _assertClassBrand(Foo, fn().Foo, _self)._.getSelf(), _m)._.call(_assertClassBrand$_$g2); - (_ref9 = fn === null || fn === void 0 ? void 0 : (_assertClassBrand$_5 = _assertClassBrand(Foo, fn().Foo, _self)._).getSelf) === null || _ref9 === void 0 ? void 0 : _assertClassBrand(Foo, _ref9$call = _ref9.call(_assertClassBrand$_5), _m)._.call(_ref9$call); - (_ref10 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref10 === void 0 ? void 0 : _assertClassBrand(Foo, _ref10$getSelf = _ref10.getSelf(), _m)._.call(_ref10$getSelf); - (_getSelf4 = (_ref11 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf) === null || _getSelf4 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf4$call = _getSelf4.call(_ref11), _m)._.call(_getSelf4$call); - (_ref12 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._.getSelf()) === null || _ref12 === void 0 ? void 0 : _assertClassBrand(Foo, _ref12$self = _ref12.self, _m)._.call(_ref12$self); - (_call2 = (fn === null || fn === void 0 ? void 0 : (_assertClassBrand$_6 = _assertClassBrand(Foo, fn().Foo, _self)._).getSelf)?.call(_assertClassBrand$_6)) === null || _call2 === void 0 ? void 0 : _assertClassBrand(Foo, _call2$self = _call2.self, _m)._.call(_call2$self); - (_getSelf5 = (fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf()) === null || _getSelf5 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf5$self = _getSelf5.self, _m)._.call(_getSelf5$self); - (_getSelf6 = (fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf?.()) === null || _getSelf6 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf6$self = _getSelf6.self, _m)._.call(_getSelf6$self); + o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _o$Foo = o.Foo, _m)._.call(_o$Foo); + o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _o$Foo2 = o.Foo, _m)._.call(_o$Foo2).toString; + o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _o$Foo3 = o.Foo, _m)._.call(_o$Foo3).toString(); + (_deep$very$o = deep?.very.o) === null || _deep$very$o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _deep$very$o$Foo = _deep$very$o.Foo, _m)._.call(_deep$very$o$Foo); + (_deep$very$o2 = deep?.very.o) === null || _deep$very$o2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _deep$very$o2$Foo = _deep$very$o2.Foo, _m)._.call(_deep$very$o2$Foo).toString; + (_deep$very$o3 = deep?.very.o) === null || _deep$very$o3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _deep$very$o3$Foo = _deep$very$o3.Foo, _m)._.call(_deep$very$o3$Foo).toString(); + o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _babelHelpers$assertC = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._, _m)._.call(_babelHelpers$assertC); + o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _babelHelpers$assertC2 = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.self, _m)._.call(_babelHelpers$assertC2); + (_ref = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref$self = _ref.self, _m)._.call(_ref$self); + (_ref2 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.self) === null || _ref2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref2$self = _ref2.self, _m)._.call(_ref2$self); + (_self2 = (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._)?.self) === null || _self2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self2$self = _self2.self, _m)._.call(_self2$self); + o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _babelHelpers$assertC3 = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.getSelf(), _m)._.call(_babelHelpers$assertC3); + (_ref3 = o === null || o === void 0 ? void 0 : (_babelHelpers$assertC4 = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._).getSelf) === null || _ref3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref3$call = _ref3.call(_babelHelpers$assertC4), _m)._.call(_ref3$call); + (_ref4 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref4 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref4$getSelf = _ref4.getSelf(), _m)._.call(_ref4$getSelf); + (_getSelf = (_ref5 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._)?.getSelf) === null || _getSelf === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf$call = _getSelf.call(_ref5), _m)._.call(_getSelf$call); + (_ref6 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.getSelf()) === null || _ref6 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref6$self = _ref6.self, _m)._.call(_ref6$self); + (_call = (o === null || o === void 0 ? void 0 : (_babelHelpers$assertC5 = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._).getSelf)?.call(_babelHelpers$assertC5)) === null || _call === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _call$self = _call.self, _m)._.call(_call$self); + (_getSelf2 = (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._)?.getSelf()) === null || _getSelf2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf2$self = _getSelf2.self, _m)._.call(_getSelf2$self); + (_getSelf3 = (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._)?.getSelf?.()) === null || _getSelf3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf3$self = _getSelf3.self, _m)._.call(_getSelf3$self); + fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fn$Foo = fn().Foo, _m)._.call(_fn$Foo); + fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fn$Foo2 = fn().Foo, _m)._.call(_fn$Foo2).toString; + fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fn$Foo3 = fn().Foo, _m)._.call(_fn$Foo3).toString(); + (_fnDeep$very$o = fnDeep?.().very.o) === null || _fnDeep$very$o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fnDeep$very$o$Foo = _fnDeep$very$o.Foo, _m)._.call(_fnDeep$very$o$Foo); + (_fnDeep$very$o2 = fnDeep?.().very.o) === null || _fnDeep$very$o2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fnDeep$very$o2$Foo = _fnDeep$very$o2.Foo, _m)._.call(_fnDeep$very$o2$Foo).toString; + (_fnDeep$very$o3 = fnDeep?.().very.o) === null || _fnDeep$very$o3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fnDeep$very$o3$Foo = _fnDeep$very$o3.Foo, _m)._.call(_fnDeep$very$o3$Foo).toString(); + fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _babelHelpers$assertC6 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._, _m)._.call(_babelHelpers$assertC6); + fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _babelHelpers$assertC7 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.self, _m)._.call(_babelHelpers$assertC7); + (_ref7 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref7 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref7$self = _ref7.self, _m)._.call(_ref7$self); + (_ref8 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.self) === null || _ref8 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref8$self = _ref8.self, _m)._.call(_ref8$self); + (_self3 = (fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._)?.self) === null || _self3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self3$self = _self3.self, _m)._.call(_self3$self); + fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _babelHelpers$assertC8 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.getSelf(), _m)._.call(_babelHelpers$assertC8); + (_ref9 = fn === null || fn === void 0 ? void 0 : (_babelHelpers$assertC9 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._).getSelf) === null || _ref9 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref9$call = _ref9.call(_babelHelpers$assertC9), _m)._.call(_ref9$call); + (_ref10 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref10 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref10$getSelf = _ref10.getSelf(), _m)._.call(_ref10$getSelf); + (_getSelf4 = (_ref11 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf) === null || _getSelf4 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf4$call = _getSelf4.call(_ref11), _m)._.call(_getSelf4$call); + (_ref12 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.getSelf()) === null || _ref12 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref12$self = _ref12.self, _m)._.call(_ref12$self); + (_call2 = (fn === null || fn === void 0 ? void 0 : (_babelHelpers$assertC10 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._).getSelf)?.call(_babelHelpers$assertC10)) === null || _call2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _call2$self = _call2.self, _m)._.call(_call2$self); + (_getSelf5 = (fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf()) === null || _getSelf5 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf5$self = _getSelf5.self, _m)._.call(_getSelf5$self); + (_getSelf6 = (fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf?.()) === null || _getSelf6 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf6$self = _getSelf6.self, _m)._.call(_getSelf6$self); } } _Foo = Foo; @@ -66,7 +65,7 @@ var _x = { }; var _m = { _: function () { - return _assertClassBrand(_Foo, this, _x)._; + return babelHelpers.assertClassBrand(_Foo, this, _x)._; } }; var _self = { diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-before-property-with-transform/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-before-property-with-transform/output.js index 5d20b43a99d0ba..238b94d9861656 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-before-property-with-transform/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-before-property-with-transform/output.js @@ -1,11 +1,10 @@ var _Foo; -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } class Foo { static getSelf() { return this; } static test() { - var _deep$very$o, _deep$very$o2, _deep$very$o3, _ref, _ref2, _self2, _assertClassBrand$_, _ref3, _ref4, _getSelf, _ref5, _ref6, _assertClassBrand$_2, _call, _getSelf2, _getSelf3, _fnDeep$very$o, _fnDeep$very$o2, _fnDeep$very$o3, _ref7, _ref8, _self3, _assertClassBrand$_3, _ref9, _ref10, _getSelf4, _ref11, _ref12, _assertClassBrand$_4, _call2, _getSelf5, _getSelf6, _ref13, _ref14, _ref15, _ref16, _ref17, _ref17$getSelf, _ref18, _ref19, _ref20, _ref21, _ref22, _ref22$getSelf; + var _deep$very$o, _deep$very$o2, _deep$very$o3, _ref, _ref2, _self2, _babelHelpers$assertC, _ref3, _ref4, _getSelf, _ref5, _ref6, _babelHelpers$assertC2, _call, _getSelf2, _getSelf3, _fnDeep$very$o, _fnDeep$very$o2, _fnDeep$very$o3, _ref7, _ref8, _self3, _babelHelpers$assertC3, _ref9, _ref10, _getSelf4, _ref11, _ref12, _babelHelpers$assertC4, _call2, _getSelf5, _getSelf6, _ref13, _ref14, _ref15, _ref16, _ref17, _ref17$getSelf, _ref18, _ref19, _ref20, _ref21, _ref22, _ref22$getSelf; const o = { Foo: Foo }; @@ -20,44 +19,44 @@ class Foo { function fnDeep() { return deep; } - o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _x)._; - o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _x)._.toString; - o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _x)._.toString(); - (_deep$very$o = deep === null || deep === void 0 ? void 0 : deep.very.o) === null || _deep$very$o === void 0 ? void 0 : _assertClassBrand(Foo, _deep$very$o.Foo, _x)._; - (_deep$very$o2 = deep === null || deep === void 0 ? void 0 : deep.very.o) === null || _deep$very$o2 === void 0 ? void 0 : _assertClassBrand(Foo, _deep$very$o2.Foo, _x)._.toString; - (_deep$very$o3 = deep === null || deep === void 0 ? void 0 : deep.very.o) === null || _deep$very$o3 === void 0 ? void 0 : _assertClassBrand(Foo, _deep$very$o3.Foo, _x)._.toString(); - o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand(Foo, o.Foo, _self)._, _x)._; - o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand(Foo, o.Foo, _self)._.self, _x)._; - (_ref = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref === void 0 ? void 0 : _assertClassBrand(Foo, _ref.self, _x)._; - (_ref2 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._.self) === null || _ref2 === void 0 ? void 0 : _assertClassBrand(Foo, _ref2.self, _x)._; - (_self2 = (_ref13 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref13 === void 0 ? void 0 : _ref13.self) === null || _self2 === void 0 ? void 0 : _assertClassBrand(Foo, _self2.self, _x)._; - o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand(Foo, o.Foo, _self)._.getSelf(), _x)._; - (_ref3 = o === null || o === void 0 ? void 0 : (_assertClassBrand$_ = _assertClassBrand(Foo, o.Foo, _self)._).getSelf) === null || _ref3 === void 0 ? void 0 : _assertClassBrand(Foo, _ref3.call(_assertClassBrand$_), _x)._; - (_ref4 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref4 === void 0 ? void 0 : _assertClassBrand(Foo, _ref4.getSelf(), _x)._; - (_getSelf = (_ref14 = _ref5 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref14 === void 0 ? void 0 : _ref14.getSelf) === null || _getSelf === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf.call(_ref5), _x)._; - (_ref6 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._.getSelf()) === null || _ref6 === void 0 ? void 0 : _assertClassBrand(Foo, _ref6.self, _x)._; - (_call = (_ref15 = o === null || o === void 0 ? void 0 : (_assertClassBrand$_2 = _assertClassBrand(Foo, o.Foo, _self)._).getSelf) === null || _ref15 === void 0 ? void 0 : _ref15.call(_assertClassBrand$_2)) === null || _call === void 0 ? void 0 : _assertClassBrand(Foo, _call.self, _x)._; - (_getSelf2 = (_ref16 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref16 === void 0 ? void 0 : _ref16.getSelf()) === null || _getSelf2 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf2.self, _x)._; - (_getSelf3 = (_ref17 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref17 === void 0 || (_ref17$getSelf = _ref17.getSelf) === null || _ref17$getSelf === void 0 ? void 0 : _ref17$getSelf.call(_ref17)) === null || _getSelf3 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf3.self, _x)._; - fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _x)._; - fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _x)._.toString; - fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _x)._.toString(); - (_fnDeep$very$o = fnDeep === null || fnDeep === void 0 ? void 0 : fnDeep().very.o) === null || _fnDeep$very$o === void 0 ? void 0 : _assertClassBrand(Foo, _fnDeep$very$o.Foo, _x)._; - (_fnDeep$very$o2 = fnDeep === null || fnDeep === void 0 ? void 0 : fnDeep().very.o) === null || _fnDeep$very$o2 === void 0 ? void 0 : _assertClassBrand(Foo, _fnDeep$very$o2.Foo, _x)._.toString; - (_fnDeep$very$o3 = fnDeep === null || fnDeep === void 0 ? void 0 : fnDeep().very.o) === null || _fnDeep$very$o3 === void 0 ? void 0 : _assertClassBrand(Foo, _fnDeep$very$o3.Foo, _x)._.toString(); - fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand(Foo, fn().Foo, _self)._, _x)._; - fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand(Foo, fn().Foo, _self)._.self, _x)._; - (_ref7 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref7 === void 0 ? void 0 : _assertClassBrand(Foo, _ref7.self, _x)._; - (_ref8 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._.self) === null || _ref8 === void 0 ? void 0 : _assertClassBrand(Foo, _ref8.self, _x)._; - (_self3 = (_ref18 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref18 === void 0 ? void 0 : _ref18.self) === null || _self3 === void 0 ? void 0 : _assertClassBrand(Foo, _self3.self, _x)._; - fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand(Foo, fn().Foo, _self)._.getSelf(), _x)._; - (_ref9 = fn === null || fn === void 0 ? void 0 : (_assertClassBrand$_3 = _assertClassBrand(Foo, fn().Foo, _self)._).getSelf) === null || _ref9 === void 0 ? void 0 : _assertClassBrand(Foo, _ref9.call(_assertClassBrand$_3), _x)._; - (_ref10 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref10 === void 0 ? void 0 : _assertClassBrand(Foo, _ref10.getSelf(), _x)._; - (_getSelf4 = (_ref19 = _ref11 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref19 === void 0 ? void 0 : _ref19.getSelf) === null || _getSelf4 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf4.call(_ref11), _x)._; - (_ref12 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._.getSelf()) === null || _ref12 === void 0 ? void 0 : _assertClassBrand(Foo, _ref12.self, _x)._; - (_call2 = (_ref20 = fn === null || fn === void 0 ? void 0 : (_assertClassBrand$_4 = _assertClassBrand(Foo, fn().Foo, _self)._).getSelf) === null || _ref20 === void 0 ? void 0 : _ref20.call(_assertClassBrand$_4)) === null || _call2 === void 0 ? void 0 : _assertClassBrand(Foo, _call2.self, _x)._; - (_getSelf5 = (_ref21 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref21 === void 0 ? void 0 : _ref21.getSelf()) === null || _getSelf5 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf5.self, _x)._; - (_getSelf6 = (_ref22 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref22 === void 0 || (_ref22$getSelf = _ref22.getSelf) === null || _ref22$getSelf === void 0 ? void 0 : _ref22$getSelf.call(_ref22)) === null || _getSelf6 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf6.self, _x)._; + o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _x)._; + o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _x)._.toString; + o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _x)._.toString(); + (_deep$very$o = deep === null || deep === void 0 ? void 0 : deep.very.o) === null || _deep$very$o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _deep$very$o.Foo, _x)._; + (_deep$very$o2 = deep === null || deep === void 0 ? void 0 : deep.very.o) === null || _deep$very$o2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _deep$very$o2.Foo, _x)._.toString; + (_deep$very$o3 = deep === null || deep === void 0 ? void 0 : deep.very.o) === null || _deep$very$o3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _deep$very$o3.Foo, _x)._.toString(); + o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, babelHelpers.assertClassBrand(Foo, o.Foo, _self)._, _x)._; + o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.self, _x)._; + (_ref = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref.self, _x)._; + (_ref2 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.self) === null || _ref2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref2.self, _x)._; + (_self2 = (_ref13 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref13 === void 0 ? void 0 : _ref13.self) === null || _self2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self2.self, _x)._; + o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.getSelf(), _x)._; + (_ref3 = o === null || o === void 0 ? void 0 : (_babelHelpers$assertC = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._).getSelf) === null || _ref3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref3.call(_babelHelpers$assertC), _x)._; + (_ref4 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref4 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref4.getSelf(), _x)._; + (_getSelf = (_ref14 = _ref5 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref14 === void 0 ? void 0 : _ref14.getSelf) === null || _getSelf === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf.call(_ref5), _x)._; + (_ref6 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.getSelf()) === null || _ref6 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref6.self, _x)._; + (_call = (_ref15 = o === null || o === void 0 ? void 0 : (_babelHelpers$assertC2 = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._).getSelf) === null || _ref15 === void 0 ? void 0 : _ref15.call(_babelHelpers$assertC2)) === null || _call === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _call.self, _x)._; + (_getSelf2 = (_ref16 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref16 === void 0 ? void 0 : _ref16.getSelf()) === null || _getSelf2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf2.self, _x)._; + (_getSelf3 = (_ref17 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref17 === void 0 || (_ref17$getSelf = _ref17.getSelf) === null || _ref17$getSelf === void 0 ? void 0 : _ref17$getSelf.call(_ref17)) === null || _getSelf3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf3.self, _x)._; + fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _x)._; + fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _x)._.toString; + fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _x)._.toString(); + (_fnDeep$very$o = fnDeep === null || fnDeep === void 0 ? void 0 : fnDeep().very.o) === null || _fnDeep$very$o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fnDeep$very$o.Foo, _x)._; + (_fnDeep$very$o2 = fnDeep === null || fnDeep === void 0 ? void 0 : fnDeep().very.o) === null || _fnDeep$very$o2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fnDeep$very$o2.Foo, _x)._.toString; + (_fnDeep$very$o3 = fnDeep === null || fnDeep === void 0 ? void 0 : fnDeep().very.o) === null || _fnDeep$very$o3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fnDeep$very$o3.Foo, _x)._.toString(); + fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._, _x)._; + fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.self, _x)._; + (_ref7 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref7 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref7.self, _x)._; + (_ref8 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.self) === null || _ref8 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref8.self, _x)._; + (_self3 = (_ref18 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref18 === void 0 ? void 0 : _ref18.self) === null || _self3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self3.self, _x)._; + fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.getSelf(), _x)._; + (_ref9 = fn === null || fn === void 0 ? void 0 : (_babelHelpers$assertC3 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._).getSelf) === null || _ref9 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref9.call(_babelHelpers$assertC3), _x)._; + (_ref10 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref10 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref10.getSelf(), _x)._; + (_getSelf4 = (_ref19 = _ref11 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref19 === void 0 ? void 0 : _ref19.getSelf) === null || _getSelf4 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf4.call(_ref11), _x)._; + (_ref12 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.getSelf()) === null || _ref12 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref12.self, _x)._; + (_call2 = (_ref20 = fn === null || fn === void 0 ? void 0 : (_babelHelpers$assertC4 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._).getSelf) === null || _ref20 === void 0 ? void 0 : _ref20.call(_babelHelpers$assertC4)) === null || _call2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _call2.self, _x)._; + (_getSelf5 = (_ref21 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref21 === void 0 ? void 0 : _ref21.getSelf()) === null || _getSelf5 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf5.self, _x)._; + (_getSelf6 = (_ref22 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref22 === void 0 || (_ref22$getSelf = _ref22.getSelf) === null || _ref22$getSelf === void 0 ? void 0 : _ref22$getSelf.call(_ref22)) === null || _getSelf6 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf6.self, _x)._; } } _Foo = Foo; diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-before-property/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-before-property/output.js index df25cf3ce858b8..a1f575a14033f3 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-before-property/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-before-property/output.js @@ -1,11 +1,10 @@ var _Foo; -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } class Foo { static getSelf() { return this; } static test() { - var _deep$very$o, _deep$very$o2, _deep$very$o3, _ref, _ref2, _self2, _assertClassBrand$_, _ref3, _ref4, _getSelf, _ref5, _ref6, _assertClassBrand$_2, _call, _getSelf2, _getSelf3, _fnDeep$very$o, _fnDeep$very$o2, _fnDeep$very$o3, _ref7, _ref8, _self3, _assertClassBrand$_3, _ref9, _ref10, _getSelf4, _ref11, _ref12, _assertClassBrand$_4, _call2, _getSelf5, _getSelf6; + var _deep$very$o, _deep$very$o2, _deep$very$o3, _ref, _ref2, _self2, _babelHelpers$assertC, _ref3, _ref4, _getSelf, _ref5, _ref6, _babelHelpers$assertC2, _call, _getSelf2, _getSelf3, _fnDeep$very$o, _fnDeep$very$o2, _fnDeep$very$o3, _ref7, _ref8, _self3, _babelHelpers$assertC3, _ref9, _ref10, _getSelf4, _ref11, _ref12, _babelHelpers$assertC4, _call2, _getSelf5, _getSelf6; const o = { Foo: Foo }; @@ -20,44 +19,44 @@ class Foo { function fnDeep() { return deep; } - o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _x)._; - o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _x)._.toString; - o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _x)._.toString(); - (_deep$very$o = deep?.very.o) === null || _deep$very$o === void 0 ? void 0 : _assertClassBrand(Foo, _deep$very$o.Foo, _x)._; - (_deep$very$o2 = deep?.very.o) === null || _deep$very$o2 === void 0 ? void 0 : _assertClassBrand(Foo, _deep$very$o2.Foo, _x)._.toString; - (_deep$very$o3 = deep?.very.o) === null || _deep$very$o3 === void 0 ? void 0 : _assertClassBrand(Foo, _deep$very$o3.Foo, _x)._.toString(); - o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand(Foo, o.Foo, _self)._, _x)._; - o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand(Foo, o.Foo, _self)._.self, _x)._; - (_ref = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref === void 0 ? void 0 : _assertClassBrand(Foo, _ref.self, _x)._; - (_ref2 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._.self) === null || _ref2 === void 0 ? void 0 : _assertClassBrand(Foo, _ref2.self, _x)._; - (_self2 = (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._)?.self) === null || _self2 === void 0 ? void 0 : _assertClassBrand(Foo, _self2.self, _x)._; - o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand(Foo, o.Foo, _self)._.getSelf(), _x)._; - (_ref3 = o === null || o === void 0 ? void 0 : (_assertClassBrand$_ = _assertClassBrand(Foo, o.Foo, _self)._).getSelf) === null || _ref3 === void 0 ? void 0 : _assertClassBrand(Foo, _ref3.call(_assertClassBrand$_), _x)._; - (_ref4 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref4 === void 0 ? void 0 : _assertClassBrand(Foo, _ref4.getSelf(), _x)._; - (_getSelf = (_ref5 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._)?.getSelf) === null || _getSelf === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf.call(_ref5), _x)._; - (_ref6 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._.getSelf()) === null || _ref6 === void 0 ? void 0 : _assertClassBrand(Foo, _ref6.self, _x)._; - (_call = (o === null || o === void 0 ? void 0 : (_assertClassBrand$_2 = _assertClassBrand(Foo, o.Foo, _self)._).getSelf)?.call(_assertClassBrand$_2)) === null || _call === void 0 ? void 0 : _assertClassBrand(Foo, _call.self, _x)._; - (_getSelf2 = (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._)?.getSelf()) === null || _getSelf2 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf2.self, _x)._; - (_getSelf3 = (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._)?.getSelf?.()) === null || _getSelf3 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf3.self, _x)._; - fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _x)._; - fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _x)._.toString; - fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _x)._.toString(); - (_fnDeep$very$o = fnDeep?.().very.o) === null || _fnDeep$very$o === void 0 ? void 0 : _assertClassBrand(Foo, _fnDeep$very$o.Foo, _x)._; - (_fnDeep$very$o2 = fnDeep?.().very.o) === null || _fnDeep$very$o2 === void 0 ? void 0 : _assertClassBrand(Foo, _fnDeep$very$o2.Foo, _x)._.toString; - (_fnDeep$very$o3 = fnDeep?.().very.o) === null || _fnDeep$very$o3 === void 0 ? void 0 : _assertClassBrand(Foo, _fnDeep$very$o3.Foo, _x)._.toString(); - fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand(Foo, fn().Foo, _self)._, _x)._; - fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand(Foo, fn().Foo, _self)._.self, _x)._; - (_ref7 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref7 === void 0 ? void 0 : _assertClassBrand(Foo, _ref7.self, _x)._; - (_ref8 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._.self) === null || _ref8 === void 0 ? void 0 : _assertClassBrand(Foo, _ref8.self, _x)._; - (_self3 = (fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._)?.self) === null || _self3 === void 0 ? void 0 : _assertClassBrand(Foo, _self3.self, _x)._; - fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand(Foo, fn().Foo, _self)._.getSelf(), _x)._; - (_ref9 = fn === null || fn === void 0 ? void 0 : (_assertClassBrand$_3 = _assertClassBrand(Foo, fn().Foo, _self)._).getSelf) === null || _ref9 === void 0 ? void 0 : _assertClassBrand(Foo, _ref9.call(_assertClassBrand$_3), _x)._; - (_ref10 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref10 === void 0 ? void 0 : _assertClassBrand(Foo, _ref10.getSelf(), _x)._; - (_getSelf4 = (_ref11 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf) === null || _getSelf4 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf4.call(_ref11), _x)._; - (_ref12 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._.getSelf()) === null || _ref12 === void 0 ? void 0 : _assertClassBrand(Foo, _ref12.self, _x)._; - (_call2 = (fn === null || fn === void 0 ? void 0 : (_assertClassBrand$_4 = _assertClassBrand(Foo, fn().Foo, _self)._).getSelf)?.call(_assertClassBrand$_4)) === null || _call2 === void 0 ? void 0 : _assertClassBrand(Foo, _call2.self, _x)._; - (_getSelf5 = (fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf()) === null || _getSelf5 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf5.self, _x)._; - (_getSelf6 = (fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf?.()) === null || _getSelf6 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf6.self, _x)._; + o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _x)._; + o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _x)._.toString; + o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _x)._.toString(); + (_deep$very$o = deep?.very.o) === null || _deep$very$o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _deep$very$o.Foo, _x)._; + (_deep$very$o2 = deep?.very.o) === null || _deep$very$o2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _deep$very$o2.Foo, _x)._.toString; + (_deep$very$o3 = deep?.very.o) === null || _deep$very$o3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _deep$very$o3.Foo, _x)._.toString(); + o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, babelHelpers.assertClassBrand(Foo, o.Foo, _self)._, _x)._; + o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.self, _x)._; + (_ref = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref.self, _x)._; + (_ref2 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.self) === null || _ref2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref2.self, _x)._; + (_self2 = (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._)?.self) === null || _self2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self2.self, _x)._; + o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.getSelf(), _x)._; + (_ref3 = o === null || o === void 0 ? void 0 : (_babelHelpers$assertC = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._).getSelf) === null || _ref3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref3.call(_babelHelpers$assertC), _x)._; + (_ref4 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref4 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref4.getSelf(), _x)._; + (_getSelf = (_ref5 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._)?.getSelf) === null || _getSelf === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf.call(_ref5), _x)._; + (_ref6 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.getSelf()) === null || _ref6 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref6.self, _x)._; + (_call = (o === null || o === void 0 ? void 0 : (_babelHelpers$assertC2 = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._).getSelf)?.call(_babelHelpers$assertC2)) === null || _call === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _call.self, _x)._; + (_getSelf2 = (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._)?.getSelf()) === null || _getSelf2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf2.self, _x)._; + (_getSelf3 = (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._)?.getSelf?.()) === null || _getSelf3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf3.self, _x)._; + fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _x)._; + fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _x)._.toString; + fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _x)._.toString(); + (_fnDeep$very$o = fnDeep?.().very.o) === null || _fnDeep$very$o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fnDeep$very$o.Foo, _x)._; + (_fnDeep$very$o2 = fnDeep?.().very.o) === null || _fnDeep$very$o2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fnDeep$very$o2.Foo, _x)._.toString; + (_fnDeep$very$o3 = fnDeep?.().very.o) === null || _fnDeep$very$o3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fnDeep$very$o3.Foo, _x)._.toString(); + fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._, _x)._; + fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.self, _x)._; + (_ref7 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref7 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref7.self, _x)._; + (_ref8 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.self) === null || _ref8 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref8.self, _x)._; + (_self3 = (fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._)?.self) === null || _self3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self3.self, _x)._; + fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.getSelf(), _x)._; + (_ref9 = fn === null || fn === void 0 ? void 0 : (_babelHelpers$assertC3 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._).getSelf) === null || _ref9 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref9.call(_babelHelpers$assertC3), _x)._; + (_ref10 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref10 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref10.getSelf(), _x)._; + (_getSelf4 = (_ref11 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf) === null || _getSelf4 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf4.call(_ref11), _x)._; + (_ref12 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.getSelf()) === null || _ref12 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref12.self, _x)._; + (_call2 = (fn === null || fn === void 0 ? void 0 : (_babelHelpers$assertC4 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._).getSelf)?.call(_babelHelpers$assertC4)) === null || _call2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _call2.self, _x)._; + (_getSelf5 = (fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf()) === null || _getSelf5 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf5.self, _x)._; + (_getSelf6 = (fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf?.()) === null || _getSelf6 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf6.self, _x)._; } } _Foo = Foo; diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-cast-to-boolean/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-cast-to-boolean/output.js index 9561d87dd6487a..0bdbce25d2f3b8 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-cast-to-boolean/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-cast-to-boolean/output.js @@ -1,46 +1,45 @@ -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } class C { static testIf(o) { - if (o !== null && o !== void 0 && _assertClassBrand(C, o, _a)._.b.c.d) { + if (o !== null && o !== void 0 && babelHelpers.assertClassBrand(C, o, _a)._.b.c.d) { return true; } return false; } static testConditional(o) { - return (o === null || o === void 0 ? void 0 : _assertClassBrand(C, o, _a)._.b)?.c.d ? true : false; + return (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(C, o, _a)._.b)?.c.d ? true : false; } static testLoop(o) { - while (o !== null && o !== void 0 && _assertClassBrand(C, o, _a)._.b.c.d) { - for (; (o === null || o === void 0 ? void 0 : _assertClassBrand(C, o, _a)._.b.c)?.d;) { + while (o !== null && o !== void 0 && babelHelpers.assertClassBrand(C, o, _a)._.b.c.d) { + for (; (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(C, o, _a)._.b.c)?.d;) { let i = 0; do { i++; if (i === 2) { return true; } - } while ((o === null || o === void 0 ? void 0 : _assertClassBrand(C, o, _a)._.b)?.c.d); + } while ((o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(C, o, _a)._.b)?.c.d); } } return false; } static testNegate(o) { - return !!(o === null || o === void 0 ? void 0 : _assertClassBrand(C, o, _a)._.b)?.c.d; + return !!(o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(C, o, _a)._.b)?.c.d; } static testIfDeep(o) { var _o$obj; - if (((_o$obj = o.obj) === null || _o$obj === void 0 ? void 0 : _assertClassBrand(C, _o$obj, _a)._.b)?.c.d) { + if (((_o$obj = o.obj) === null || _o$obj === void 0 ? void 0 : babelHelpers.assertClassBrand(C, _o$obj, _a)._.b)?.c.d) { return true; } return false; } static testConditionalDeep(o) { var _o$obj2; - return ((_o$obj2 = o.obj) === null || _o$obj2 === void 0 ? void 0 : _assertClassBrand(C, _o$obj2, _a)._.b)?.c.d ? true : false; + return ((_o$obj2 = o.obj) === null || _o$obj2 === void 0 ? void 0 : babelHelpers.assertClassBrand(C, _o$obj2, _a)._.b)?.c.d ? true : false; } static testLoopDeep(o) { - while ((_o$obj3 = o.obj) !== null && _o$obj3 !== void 0 && _assertClassBrand(C, _o$obj3, _a)._.b.c.d) { + while ((_o$obj3 = o.obj) !== null && _o$obj3 !== void 0 && babelHelpers.assertClassBrand(C, _o$obj3, _a)._.b.c.d) { var _o$obj3; - for (; ((_o$obj4 = o.obj) === null || _o$obj4 === void 0 ? void 0 : _assertClassBrand(C, _o$obj4, _a)._.b.c)?.d;) { + for (; ((_o$obj4 = o.obj) === null || _o$obj4 === void 0 ? void 0 : babelHelpers.assertClassBrand(C, _o$obj4, _a)._.b.c)?.d;) { var _o$obj4; let i = 0; do { @@ -49,29 +48,29 @@ class C { if (i === 2) { return true; } - } while (((_o$obj5 = o.obj) === null || _o$obj5 === void 0 ? void 0 : _assertClassBrand(C, _o$obj5, _a)._.b)?.c.d); + } while (((_o$obj5 = o.obj) === null || _o$obj5 === void 0 ? void 0 : babelHelpers.assertClassBrand(C, _o$obj5, _a)._.b)?.c.d); } } return false; } static testNegateDeep(o) { var _o$obj6; - return !!((_o$obj6 = o.obj) === null || _o$obj6 === void 0 ? void 0 : _assertClassBrand(C, _o$obj6, _a)._.b)?.c.d; + return !!((_o$obj6 = o.obj) === null || _o$obj6 === void 0 ? void 0 : babelHelpers.assertClassBrand(C, _o$obj6, _a)._.b)?.c.d; } static testLogicalInIf(o) { - if ((o === null || o === void 0 ? void 0 : _assertClassBrand(C, o, _a)._.b)?.c.d && (o === null || o === void 0 ? void 0 : _assertClassBrand(C, o, _a)._)?.b.c.d) { + if ((o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(C, o, _a)._.b)?.c.d && (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(C, o, _a)._)?.b.c.d) { return true; } return false; } static testLogicalInReturn(o) { - return (o === null || o === void 0 ? void 0 : _assertClassBrand(C, o, _a)._.b)?.c.d && (o === null || o === void 0 ? void 0 : _assertClassBrand(C, o, _a)._)?.b.c.d; + return (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(C, o, _a)._.b)?.c.d && (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(C, o, _a)._)?.b.c.d; } static testNullishCoalescing(o) { - if ((o === null || o === void 0 ? void 0 : _assertClassBrand(C, o, _a)._.b)?.c.non_existent ?? (o === null || o === void 0 ? void 0 : _assertClassBrand(C, o, _a)._.b)?.c.d) { - return (o === null || o === void 0 ? void 0 : _assertClassBrand(C, o, _a)._.b)?.c.non_existent ?? (o === null || o === void 0 ? void 0 : _assertClassBrand(C, o, _a)._.b)?.c.d; + if ((o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(C, o, _a)._.b)?.c.non_existent ?? (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(C, o, _a)._.b)?.c.d) { + return (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(C, o, _a)._.b)?.c.non_existent ?? (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(C, o, _a)._.b)?.c.d; } - return (o === null || o === void 0 ? void 0 : _assertClassBrand(C, o, _a)._.b)?.c.non_existent ?? o; + return (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(C, o, _a)._.b)?.c.non_existent ?? o; } } var _a = { diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-delete-property/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-delete-property/output.js index 56f28d3ab47e73..9b4d3690b8d458 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-delete-property/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-delete-property/output.js @@ -1,11 +1,10 @@ var _Foo; -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } class Foo { static getSelf() { return this; } static test() { - var _deep$very$o, _assertClassBrand$_, _assertClassBrand$_2, _fnDeep$very$o, _assertClassBrand$_3, _assertClassBrand$_4; + var _deep$very$o, _babelHelpers$assertC, _babelHelpers$assertC2, _fnDeep$very$o, _babelHelpers$assertC3, _babelHelpers$assertC4; const o = { Foo: Foo }; @@ -21,35 +20,35 @@ class Foo { return deep; } Foo === null || Foo === void 0 ? true : delete _self._.unicorn; - (_deep$very$o = deep?.very.o) === null || _deep$very$o === void 0 ? true : delete _assertClassBrand(Foo, _deep$very$o.Foo, _self)._.unicorn; - o === null || o === void 0 ? true : delete _assertClassBrand(Foo, o.Foo, _self)._.unicorn; - o === null || o === void 0 ? true : delete _assertClassBrand(Foo, o.Foo, _self)._.self.unicorn; - delete (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._)?.self.unicorn; - delete (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._.self)?.self.unicorn; - delete (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._)?.self?.self.unicorn; - o === null || o === void 0 ? true : delete _assertClassBrand(Foo, o.Foo, _self)._.getSelf().unicorn; - delete (o === null || o === void 0 ? void 0 : (_assertClassBrand$_ = _assertClassBrand(Foo, o.Foo, _self)._).getSelf)?.call(_assertClassBrand$_).unicorn; - delete (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._)?.getSelf().unicorn; - delete (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._)?.getSelf?.().unicorn; - delete (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._.getSelf())?.self.unicorn; - delete (o === null || o === void 0 ? void 0 : (_assertClassBrand$_2 = _assertClassBrand(Foo, o.Foo, _self)._).getSelf)?.call(_assertClassBrand$_2)?.self.unicorn; - delete (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._)?.getSelf()?.self.unicorn; - delete (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._)?.getSelf?.()?.self.unicorn; - fn === null || fn === void 0 ? true : delete _assertClassBrand(Foo, fn().Foo, _self)._.unicorn; - (_fnDeep$very$o = fnDeep?.().very.o) === null || _fnDeep$very$o === void 0 ? true : delete _assertClassBrand(Foo, _fnDeep$very$o.Foo, _self)._.unicorn; - fn === null || fn === void 0 ? true : delete _assertClassBrand(Foo, fn().Foo, _self)._.unicorn; - fn === null || fn === void 0 ? true : delete _assertClassBrand(Foo, fn().Foo, _self)._.self.unicorn; - delete (fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._)?.self.unicorn; - delete (fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._.self)?.self.unicorn; - delete (fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._)?.self?.self.unicorn; - fn === null || fn === void 0 ? true : delete _assertClassBrand(Foo, fn().Foo, _self)._.getSelf().unicorn; - delete (fn === null || fn === void 0 ? void 0 : (_assertClassBrand$_3 = _assertClassBrand(Foo, fn().Foo, _self)._).getSelf)?.call(_assertClassBrand$_3).unicorn; - delete (fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf().unicorn; - delete (fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf?.().unicorn; - delete (fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._.getSelf())?.self.unicorn; - delete (fn === null || fn === void 0 ? void 0 : (_assertClassBrand$_4 = _assertClassBrand(Foo, fn().Foo, _self)._).getSelf)?.call(_assertClassBrand$_4)?.self.unicorn; - delete (fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf()?.self.unicorn; - delete (fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf?.()?.self.unicorn; + (_deep$very$o = deep?.very.o) === null || _deep$very$o === void 0 ? true : delete babelHelpers.assertClassBrand(Foo, _deep$very$o.Foo, _self)._.unicorn; + o === null || o === void 0 ? true : delete babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.unicorn; + o === null || o === void 0 ? true : delete babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.self.unicorn; + delete (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._)?.self.unicorn; + delete (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.self)?.self.unicorn; + delete (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._)?.self?.self.unicorn; + o === null || o === void 0 ? true : delete babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.getSelf().unicorn; + delete (o === null || o === void 0 ? void 0 : (_babelHelpers$assertC = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._).getSelf)?.call(_babelHelpers$assertC).unicorn; + delete (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._)?.getSelf().unicorn; + delete (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._)?.getSelf?.().unicorn; + delete (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.getSelf())?.self.unicorn; + delete (o === null || o === void 0 ? void 0 : (_babelHelpers$assertC2 = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._).getSelf)?.call(_babelHelpers$assertC2)?.self.unicorn; + delete (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._)?.getSelf()?.self.unicorn; + delete (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._)?.getSelf?.()?.self.unicorn; + fn === null || fn === void 0 ? true : delete babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.unicorn; + (_fnDeep$very$o = fnDeep?.().very.o) === null || _fnDeep$very$o === void 0 ? true : delete babelHelpers.assertClassBrand(Foo, _fnDeep$very$o.Foo, _self)._.unicorn; + fn === null || fn === void 0 ? true : delete babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.unicorn; + fn === null || fn === void 0 ? true : delete babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.self.unicorn; + delete (fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._)?.self.unicorn; + delete (fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.self)?.self.unicorn; + delete (fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._)?.self?.self.unicorn; + fn === null || fn === void 0 ? true : delete babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.getSelf().unicorn; + delete (fn === null || fn === void 0 ? void 0 : (_babelHelpers$assertC3 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._).getSelf)?.call(_babelHelpers$assertC3).unicorn; + delete (fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf().unicorn; + delete (fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf?.().unicorn; + delete (fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.getSelf())?.self.unicorn; + delete (fn === null || fn === void 0 ? void 0 : (_babelHelpers$assertC4 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._).getSelf)?.call(_babelHelpers$assertC4)?.self.unicorn; + delete (fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf()?.self.unicorn; + delete (fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf?.()?.self.unicorn; } } _Foo = Foo; diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-in-function-param-with-transform/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-in-function-param-with-transform/output.js index 8fb28958b764f9..37da25966026ad 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-in-function-param-with-transform/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-in-function-param-with-transform/output.js @@ -1,5 +1,4 @@ var _Foo; -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } class Foo { static getSelf() { return this; @@ -19,19 +18,19 @@ class Foo { function fnDeep() { return deep; } - function f(o, r = (_o$Foo => o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _o$Foo = o.Foo, _m)._.call(_o$Foo))()) { + function f(o, r = (_o$Foo => o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _o$Foo = o.Foo, _m)._.call(_o$Foo))()) { return r; } - function g(o, r = (_ref => (_ref = (() => o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand(Foo, o.Foo, _self)._.getSelf(), _m)._)()) === null || _ref === void 0 ? void 0 : _ref())()) { + function g(o, r = (_ref => (_ref = (() => o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.getSelf(), _m)._)()) === null || _ref === void 0 ? void 0 : _ref())()) { return r; } - function h(fnDeep, r = ((_fnDeep$very$o$Foo, _fnDeep$very$o) => (_fnDeep$very$o$Foo = fnDeep === null || fnDeep === void 0 || (_fnDeep$very$o = fnDeep().very.o) === null || _fnDeep$very$o === void 0 ? void 0 : _fnDeep$very$o.Foo) === null || _fnDeep$very$o$Foo === void 0 ? void 0 : _assertClassBrand(Foo, _fnDeep$very$o$Foo, _m)._.call(_fnDeep$very$o$Foo))()) { + function h(fnDeep, r = ((_fnDeep$very$o$Foo, _fnDeep$very$o) => (_fnDeep$very$o$Foo = fnDeep === null || fnDeep === void 0 || (_fnDeep$very$o = fnDeep().very.o) === null || _fnDeep$very$o === void 0 ? void 0 : _fnDeep$very$o.Foo) === null || _fnDeep$very$o$Foo === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fnDeep$very$o$Foo, _m)._.call(_fnDeep$very$o$Foo))()) { return r; } - function i(fn, r = ((_getSelf, _getSelf$self, _ref2) => (_getSelf = (_ref2 = (() => fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._)()) === null || _ref2 === void 0 ? void 0 : _ref2.getSelf()) === null || _getSelf === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf$self = _getSelf.self, _m)._.call(_getSelf$self))()) { + function i(fn, r = ((_getSelf, _getSelf$self, _ref2) => (_getSelf = (_ref2 = (() => fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._)()) === null || _ref2 === void 0 ? void 0 : _ref2.getSelf()) === null || _getSelf === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf$self = _getSelf.self, _m)._.call(_getSelf$self))()) { return r; } - function j(fn, r = ((_assertClassBrand$_$g, _assertClassBrand$_) => (_assertClassBrand$_ = _assertClassBrand(Foo, _assertClassBrand$_$g = _assertClassBrand(Foo, fn().Foo, _self)._.getSelf().self, _m)._) === null || _assertClassBrand$_ === void 0 ? void 0 : _assertClassBrand$_.call(_assertClassBrand$_$g))()) { + function j(fn, r = ((_babelHelpers$assertC, _babelHelpers$assertC2) => (_babelHelpers$assertC2 = babelHelpers.assertClassBrand(Foo, _babelHelpers$assertC = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.getSelf().self, _m)._) === null || _babelHelpers$assertC2 === void 0 ? void 0 : _babelHelpers$assertC2.call(_babelHelpers$assertC))()) { return r; } f(o); @@ -47,7 +46,7 @@ var _x = { }; var _m = { _: function () { - return _assertClassBrand(_Foo, this, _x)._; + return babelHelpers.assertClassBrand(_Foo, this, _x)._; } }; var _self = { diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-in-function-param/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-in-function-param/output.js index 3789de787ad1ec..6a6cde83cadd85 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-in-function-param/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-in-function-param/output.js @@ -1,5 +1,4 @@ var _Foo; -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } class Foo { static getSelf() { return this; @@ -19,19 +18,19 @@ class Foo { function fnDeep() { return deep; } - function f(o, r = (_o$Foo => o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _o$Foo = o.Foo, _m)._.call(_o$Foo))()) { + function f(o, r = (_o$Foo => o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _o$Foo = o.Foo, _m)._.call(_o$Foo))()) { return r; } - function g(o, r = (() => o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand(Foo, o.Foo, _self)._.getSelf(), _m)._)()?.()) { + function g(o, r = (() => o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.getSelf(), _m)._)()?.()) { return r; } - function h(fnDeep, r = (_fnDeep$very$o$Foo => (_fnDeep$very$o$Foo = fnDeep?.().very.o?.Foo) === null || _fnDeep$very$o$Foo === void 0 ? void 0 : _assertClassBrand(Foo, _fnDeep$very$o$Foo, _m)._.call(_fnDeep$very$o$Foo))()) { + function h(fnDeep, r = (_fnDeep$very$o$Foo => (_fnDeep$very$o$Foo = fnDeep?.().very.o?.Foo) === null || _fnDeep$very$o$Foo === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fnDeep$very$o$Foo, _m)._.call(_fnDeep$very$o$Foo))()) { return r; } - function i(fn, r = ((_getSelf, _getSelf$self) => (_getSelf = (() => fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._)()?.getSelf()) === null || _getSelf === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf$self = _getSelf.self, _m)._.call(_getSelf$self))()) { + function i(fn, r = ((_getSelf, _getSelf$self) => (_getSelf = (() => fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._)()?.getSelf()) === null || _getSelf === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf$self = _getSelf.self, _m)._.call(_getSelf$self))()) { return r; } - function j(fn, r = (_assertClassBrand$_$g => _assertClassBrand(Foo, _assertClassBrand$_$g = _assertClassBrand(Foo, fn().Foo, _self)._.getSelf().self, _m)._?.call(_assertClassBrand$_$g))()) { + function j(fn, r = (_babelHelpers$assertC => babelHelpers.assertClassBrand(Foo, _babelHelpers$assertC = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.getSelf().self, _m)._?.call(_babelHelpers$assertC))()) { return r; } f(o); @@ -47,7 +46,7 @@ var _x = { }; var _m = { _: function () { - return _assertClassBrand(_Foo, this, _x)._; + return babelHelpers.assertClassBrand(_Foo, this, _x)._; } }; var _self = { diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-member-optional-call-spread-arguments/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-member-optional-call-spread-arguments/output.js index 94689a246694bc..d03dfc3b860e40 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-member-optional-call-spread-arguments/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-member-optional-call-spread-arguments/output.js @@ -1,23 +1,18 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } -function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); } -function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; } -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } var _m = /*#__PURE__*/new WeakMap(); class Foo { constructor() { - _classPrivateFieldInitSpec(this, _m, void 0); + babelHelpers.classPrivateFieldInitSpec(this, _m, void 0); } init() { - _classPrivateFieldSet(_m, this, (...args) => args); + babelHelpers.classPrivateFieldSet2(_m, this, (...args) => args); } static test() { const f = new Foo(); f.init(); - return _classPrivateFieldGet(_m, f)?.apply(f, arguments); + return babelHelpers.classPrivateFieldGet2(_m, f)?.apply(f, arguments); } static testNull() { const f = new Foo(); - return _classPrivateFieldGet(_m, f)?.apply(f, arguments); + return babelHelpers.classPrivateFieldGet2(_m, f)?.apply(f, arguments); } } \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-member-optional-call-with-transform/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-member-optional-call-with-transform/output.js index 6b24debec0fa0c..cf287a4ae2a768 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-member-optional-call-with-transform/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-member-optional-call-with-transform/output.js @@ -1,11 +1,10 @@ var _Foo; -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } class Foo { static getSelf() { return this; } static test() { - var _o$Foo, _o$Foo2, _o$Foo3, _deep$very$o, _deep$very$o$Foo, _deep$very$o2, _deep$very$o2$Foo, _deep$very$o3, _deep$very$o3$Foo, _assertClassBrand$_, _assertClassBrand$_$s, _ref, _ref$self, _ref2, _ref2$self, _self2, _self2$self, _assertClassBrand$_$g, _assertClassBrand$_2, _ref3, _ref3$call, _ref4, _ref4$getSelf, _getSelf, _ref5, _getSelf$call, _ref6, _ref6$self, _assertClassBrand$_3, _call, _call$self, _getSelf2, _getSelf2$self, _getSelf3, _getSelf3$self, _fn$Foo, _fn$Foo2, _fn$Foo3, _fnDeep$very$o, _fnDeep$very$o$Foo, _fnDeep$very$o2, _fnDeep$very$o2$Foo, _fnDeep$very$o3, _fnDeep$very$o3$Foo, _assertClassBrand$_4, _assertClassBrand$_$s2, _ref7, _ref7$self, _ref8, _ref8$self, _self3, _self3$self, _assertClassBrand$_$g2, _assertClassBrand$_5, _ref9, _ref9$call, _ref10, _ref10$getSelf, _getSelf4, _ref11, _getSelf4$call, _ref12, _ref12$self, _assertClassBrand$_6, _call2, _call2$self, _getSelf5, _getSelf5$self, _getSelf6, _getSelf6$self, _m$_, _m$_2, _m$_3, _assertClassBrand$_7, _assertClassBrand$_8, _assertClassBrand$_9, _assertClassBrand$_10, _assertClassBrand$_11, _assertClassBrand$_12, _ref13, _ref14, _assertClassBrand$_13, _assertClassBrand$_14, _ref15, _assertClassBrand$_15, _ref16, _assertClassBrand$_16, _assertClassBrand$_17, _ref17, _assertClassBrand$_18, _assertClassBrand$_19, _ref18, _assertClassBrand$_20, _ref19, _assertClassBrand$_21, _ref20, _ref20$getSelf, _assertClassBrand$_22, _assertClassBrand$_23, _assertClassBrand$_24, _assertClassBrand$_25, _assertClassBrand$_26, _assertClassBrand$_27, _assertClassBrand$_28, _ref21, _ref22, _assertClassBrand$_29, _assertClassBrand$_30, _ref23, _assertClassBrand$_31, _ref24, _assertClassBrand$_32, _assertClassBrand$_33, _ref25, _assertClassBrand$_34, _assertClassBrand$_35, _ref26, _assertClassBrand$_36, _ref27, _assertClassBrand$_37, _ref28, _ref28$getSelf, _assertClassBrand$_38; + var _o$Foo, _o$Foo2, _o$Foo3, _deep$very$o, _deep$very$o$Foo, _deep$very$o2, _deep$very$o2$Foo, _deep$very$o3, _deep$very$o3$Foo, _babelHelpers$assertC, _babelHelpers$assertC2, _ref, _ref$self, _ref2, _ref2$self, _self2, _self2$self, _babelHelpers$assertC3, _babelHelpers$assertC4, _ref3, _ref3$call, _ref4, _ref4$getSelf, _getSelf, _ref5, _getSelf$call, _ref6, _ref6$self, _babelHelpers$assertC5, _call, _call$self, _getSelf2, _getSelf2$self, _getSelf3, _getSelf3$self, _fn$Foo, _fn$Foo2, _fn$Foo3, _fnDeep$very$o, _fnDeep$very$o$Foo, _fnDeep$very$o2, _fnDeep$very$o2$Foo, _fnDeep$very$o3, _fnDeep$very$o3$Foo, _babelHelpers$assertC6, _babelHelpers$assertC7, _ref7, _ref7$self, _ref8, _ref8$self, _self3, _self3$self, _babelHelpers$assertC8, _babelHelpers$assertC9, _ref9, _ref9$call, _ref10, _ref10$getSelf, _getSelf4, _ref11, _getSelf4$call, _ref12, _ref12$self, _babelHelpers$assertC10, _call2, _call2$self, _getSelf5, _getSelf5$self, _getSelf6, _getSelf6$self, _m$_, _m$_2, _m$_3, _babelHelpers$assertC11, _babelHelpers$assertC12, _babelHelpers$assertC13, _babelHelpers$assertC14, _babelHelpers$assertC15, _babelHelpers$assertC16, _ref13, _ref14, _babelHelpers$assertC17, _babelHelpers$assertC18, _ref15, _babelHelpers$assertC19, _ref16, _babelHelpers$assertC20, _babelHelpers$assertC21, _ref17, _babelHelpers$assertC22, _babelHelpers$assertC23, _ref18, _babelHelpers$assertC24, _ref19, _babelHelpers$assertC25, _ref20, _ref20$getSelf, _babelHelpers$assertC26, _babelHelpers$assertC27, _babelHelpers$assertC28, _babelHelpers$assertC29, _babelHelpers$assertC30, _babelHelpers$assertC31, _babelHelpers$assertC32, _ref21, _ref22, _babelHelpers$assertC33, _babelHelpers$assertC34, _ref23, _babelHelpers$assertC35, _ref24, _babelHelpers$assertC36, _babelHelpers$assertC37, _ref25, _babelHelpers$assertC38, _babelHelpers$assertC39, _ref26, _babelHelpers$assertC40, _ref27, _babelHelpers$assertC41, _ref28, _ref28$getSelf, _babelHelpers$assertC42; const o = { Foo: Foo }; @@ -23,44 +22,44 @@ class Foo { (_m$_ = _m._) === null || _m$_ === void 0 || _m$_.call(Foo); (_m$_2 = _m._) === null || _m$_2 === void 0 || _m$_2.call(Foo).toString; (_m$_3 = _m._) === null || _m$_3 === void 0 || _m$_3.call(Foo).toString(); - o === null || o === void 0 ? void 0 : (_assertClassBrand$_7 = _assertClassBrand(Foo, _o$Foo = o.Foo, _m)._) === null || _assertClassBrand$_7 === void 0 ? void 0 : _assertClassBrand$_7.call(_o$Foo); - o === null || o === void 0 ? void 0 : (_assertClassBrand$_8 = _assertClassBrand(Foo, _o$Foo2 = o.Foo, _m)._) === null || _assertClassBrand$_8 === void 0 ? void 0 : _assertClassBrand$_8.call(_o$Foo2).toString; - o === null || o === void 0 ? void 0 : (_assertClassBrand$_9 = _assertClassBrand(Foo, _o$Foo3 = o.Foo, _m)._) === null || _assertClassBrand$_9 === void 0 ? void 0 : _assertClassBrand$_9.call(_o$Foo3).toString(); - (_deep$very$o = deep === null || deep === void 0 ? void 0 : deep.very.o) === null || _deep$very$o === void 0 ? void 0 : (_assertClassBrand$_10 = _assertClassBrand(Foo, _deep$very$o$Foo = _deep$very$o.Foo, _m)._) === null || _assertClassBrand$_10 === void 0 ? void 0 : _assertClassBrand$_10.call(_deep$very$o$Foo); - (_deep$very$o2 = deep === null || deep === void 0 ? void 0 : deep.very.o) === null || _deep$very$o2 === void 0 ? void 0 : (_assertClassBrand$_11 = _assertClassBrand(Foo, _deep$very$o2$Foo = _deep$very$o2.Foo, _m)._) === null || _assertClassBrand$_11 === void 0 ? void 0 : _assertClassBrand$_11.call(_deep$very$o2$Foo).toString; - (_deep$very$o3 = deep === null || deep === void 0 ? void 0 : deep.very.o) === null || _deep$very$o3 === void 0 ? void 0 : (_assertClassBrand$_12 = _assertClassBrand(Foo, _deep$very$o3$Foo = _deep$very$o3.Foo, _m)._) === null || _assertClassBrand$_12 === void 0 ? void 0 : _assertClassBrand$_12.call(_deep$very$o3$Foo).toString(); - (_ref13 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand$_ = _assertClassBrand(Foo, o.Foo, _self)._, _m)._) === null || _ref13 === void 0 || _ref13.call(_assertClassBrand$_); - (_ref14 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand$_$s = _assertClassBrand(Foo, o.Foo, _self)._.self, _m)._) === null || _ref14 === void 0 || _ref14.call(_assertClassBrand$_$s); - (_ref = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref === void 0 ? void 0 : (_assertClassBrand$_13 = _assertClassBrand(Foo, _ref$self = _ref.self, _m)._) === null || _assertClassBrand$_13 === void 0 ? void 0 : _assertClassBrand$_13.call(_ref$self); - (_ref2 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._.self) === null || _ref2 === void 0 ? void 0 : (_assertClassBrand$_14 = _assertClassBrand(Foo, _ref2$self = _ref2.self, _m)._) === null || _assertClassBrand$_14 === void 0 ? void 0 : _assertClassBrand$_14.call(_ref2$self); - (_self2 = (_ref15 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref15 === void 0 ? void 0 : _ref15.self) === null || _self2 === void 0 ? void 0 : (_assertClassBrand$_15 = _assertClassBrand(Foo, _self2$self = _self2.self, _m)._) === null || _assertClassBrand$_15 === void 0 ? void 0 : _assertClassBrand$_15.call(_self2$self); - (_ref16 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand$_$g = _assertClassBrand(Foo, o.Foo, _self)._.getSelf(), _m)._) === null || _ref16 === void 0 || _ref16.call(_assertClassBrand$_$g); - (_ref3 = o === null || o === void 0 ? void 0 : (_assertClassBrand$_2 = _assertClassBrand(Foo, o.Foo, _self)._).getSelf) === null || _ref3 === void 0 ? void 0 : (_assertClassBrand$_16 = _assertClassBrand(Foo, _ref3$call = _ref3.call(_assertClassBrand$_2), _m)._) === null || _assertClassBrand$_16 === void 0 ? void 0 : _assertClassBrand$_16.call(_ref3$call); - (_ref4 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref4 === void 0 ? void 0 : (_assertClassBrand$_17 = _assertClassBrand(Foo, _ref4$getSelf = _ref4.getSelf(), _m)._) === null || _assertClassBrand$_17 === void 0 ? void 0 : _assertClassBrand$_17.call(_ref4$getSelf); - (_getSelf = (_ref17 = _ref5 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref17 === void 0 ? void 0 : _ref17.getSelf) === null || _getSelf === void 0 ? void 0 : (_assertClassBrand$_18 = _assertClassBrand(Foo, _getSelf$call = _getSelf.call(_ref5), _m)._) === null || _assertClassBrand$_18 === void 0 ? void 0 : _assertClassBrand$_18.call(_getSelf$call); - (_ref6 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._.getSelf()) === null || _ref6 === void 0 ? void 0 : (_assertClassBrand$_19 = _assertClassBrand(Foo, _ref6$self = _ref6.self, _m)._) === null || _assertClassBrand$_19 === void 0 ? void 0 : _assertClassBrand$_19.call(_ref6$self); - (_call = (_ref18 = o === null || o === void 0 ? void 0 : (_assertClassBrand$_3 = _assertClassBrand(Foo, o.Foo, _self)._).getSelf) === null || _ref18 === void 0 ? void 0 : _ref18.call(_assertClassBrand$_3)) === null || _call === void 0 ? void 0 : (_assertClassBrand$_20 = _assertClassBrand(Foo, _call$self = _call.self, _m)._) === null || _assertClassBrand$_20 === void 0 ? void 0 : _assertClassBrand$_20.call(_call$self); - (_getSelf2 = (_ref19 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref19 === void 0 ? void 0 : _ref19.getSelf()) === null || _getSelf2 === void 0 ? void 0 : (_assertClassBrand$_21 = _assertClassBrand(Foo, _getSelf2$self = _getSelf2.self, _m)._) === null || _assertClassBrand$_21 === void 0 ? void 0 : _assertClassBrand$_21.call(_getSelf2$self); - (_getSelf3 = (_ref20 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref20 === void 0 || (_ref20$getSelf = _ref20.getSelf) === null || _ref20$getSelf === void 0 ? void 0 : _ref20$getSelf.call(_ref20)) === null || _getSelf3 === void 0 ? void 0 : (_assertClassBrand$_22 = _assertClassBrand(Foo, _getSelf3$self = _getSelf3.self, _m)._) === null || _assertClassBrand$_22 === void 0 ? void 0 : _assertClassBrand$_22.call(_getSelf3$self); - fn === null || fn === void 0 ? void 0 : (_assertClassBrand$_23 = _assertClassBrand(Foo, _fn$Foo = fn().Foo, _m)._) === null || _assertClassBrand$_23 === void 0 ? void 0 : _assertClassBrand$_23.call(_fn$Foo); - fn === null || fn === void 0 ? void 0 : (_assertClassBrand$_24 = _assertClassBrand(Foo, _fn$Foo2 = fn().Foo, _m)._) === null || _assertClassBrand$_24 === void 0 ? void 0 : _assertClassBrand$_24.call(_fn$Foo2).toString; - fn === null || fn === void 0 ? void 0 : (_assertClassBrand$_25 = _assertClassBrand(Foo, _fn$Foo3 = fn().Foo, _m)._) === null || _assertClassBrand$_25 === void 0 ? void 0 : _assertClassBrand$_25.call(_fn$Foo3).toString(); - (_fnDeep$very$o = fnDeep === null || fnDeep === void 0 ? void 0 : fnDeep().very.o) === null || _fnDeep$very$o === void 0 ? void 0 : (_assertClassBrand$_26 = _assertClassBrand(Foo, _fnDeep$very$o$Foo = _fnDeep$very$o.Foo, _m)._) === null || _assertClassBrand$_26 === void 0 ? void 0 : _assertClassBrand$_26.call(_fnDeep$very$o$Foo); - (_fnDeep$very$o2 = fnDeep === null || fnDeep === void 0 ? void 0 : fnDeep().very.o) === null || _fnDeep$very$o2 === void 0 ? void 0 : (_assertClassBrand$_27 = _assertClassBrand(Foo, _fnDeep$very$o2$Foo = _fnDeep$very$o2.Foo, _m)._) === null || _assertClassBrand$_27 === void 0 ? void 0 : _assertClassBrand$_27.call(_fnDeep$very$o2$Foo).toString; - (_fnDeep$very$o3 = fnDeep === null || fnDeep === void 0 ? void 0 : fnDeep().very.o) === null || _fnDeep$very$o3 === void 0 ? void 0 : (_assertClassBrand$_28 = _assertClassBrand(Foo, _fnDeep$very$o3$Foo = _fnDeep$very$o3.Foo, _m)._) === null || _assertClassBrand$_28 === void 0 ? void 0 : _assertClassBrand$_28.call(_fnDeep$very$o3$Foo).toString(); - (_ref21 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand$_4 = _assertClassBrand(Foo, fn().Foo, _self)._, _m)._) === null || _ref21 === void 0 || _ref21.call(_assertClassBrand$_4); - (_ref22 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand$_$s2 = _assertClassBrand(Foo, fn().Foo, _self)._.self, _m)._) === null || _ref22 === void 0 || _ref22.call(_assertClassBrand$_$s2); - (_ref7 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref7 === void 0 ? void 0 : (_assertClassBrand$_29 = _assertClassBrand(Foo, _ref7$self = _ref7.self, _m)._) === null || _assertClassBrand$_29 === void 0 ? void 0 : _assertClassBrand$_29.call(_ref7$self); - (_ref8 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._.self) === null || _ref8 === void 0 ? void 0 : (_assertClassBrand$_30 = _assertClassBrand(Foo, _ref8$self = _ref8.self, _m)._) === null || _assertClassBrand$_30 === void 0 ? void 0 : _assertClassBrand$_30.call(_ref8$self); - (_self3 = (_ref23 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref23 === void 0 ? void 0 : _ref23.self) === null || _self3 === void 0 ? void 0 : (_assertClassBrand$_31 = _assertClassBrand(Foo, _self3$self = _self3.self, _m)._) === null || _assertClassBrand$_31 === void 0 ? void 0 : _assertClassBrand$_31.call(_self3$self); - (_ref24 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand$_$g2 = _assertClassBrand(Foo, fn().Foo, _self)._.getSelf(), _m)._) === null || _ref24 === void 0 || _ref24.call(_assertClassBrand$_$g2); - (_ref9 = fn === null || fn === void 0 ? void 0 : (_assertClassBrand$_5 = _assertClassBrand(Foo, fn().Foo, _self)._).getSelf) === null || _ref9 === void 0 ? void 0 : (_assertClassBrand$_32 = _assertClassBrand(Foo, _ref9$call = _ref9.call(_assertClassBrand$_5), _m)._) === null || _assertClassBrand$_32 === void 0 ? void 0 : _assertClassBrand$_32.call(_ref9$call); - (_ref10 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref10 === void 0 ? void 0 : (_assertClassBrand$_33 = _assertClassBrand(Foo, _ref10$getSelf = _ref10.getSelf(), _m)._) === null || _assertClassBrand$_33 === void 0 ? void 0 : _assertClassBrand$_33.call(_ref10$getSelf); - (_getSelf4 = (_ref25 = _ref11 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref25 === void 0 ? void 0 : _ref25.getSelf) === null || _getSelf4 === void 0 ? void 0 : (_assertClassBrand$_34 = _assertClassBrand(Foo, _getSelf4$call = _getSelf4.call(_ref11), _m)._) === null || _assertClassBrand$_34 === void 0 ? void 0 : _assertClassBrand$_34.call(_getSelf4$call); - (_ref12 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._.getSelf()) === null || _ref12 === void 0 ? void 0 : (_assertClassBrand$_35 = _assertClassBrand(Foo, _ref12$self = _ref12.self, _m)._) === null || _assertClassBrand$_35 === void 0 ? void 0 : _assertClassBrand$_35.call(_ref12$self); - (_call2 = (_ref26 = fn === null || fn === void 0 ? void 0 : (_assertClassBrand$_6 = _assertClassBrand(Foo, fn().Foo, _self)._).getSelf) === null || _ref26 === void 0 ? void 0 : _ref26.call(_assertClassBrand$_6)) === null || _call2 === void 0 ? void 0 : (_assertClassBrand$_36 = _assertClassBrand(Foo, _call2$self = _call2.self, _m)._) === null || _assertClassBrand$_36 === void 0 ? void 0 : _assertClassBrand$_36.call(_call2$self); - (_getSelf5 = (_ref27 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref27 === void 0 ? void 0 : _ref27.getSelf()) === null || _getSelf5 === void 0 ? void 0 : (_assertClassBrand$_37 = _assertClassBrand(Foo, _getSelf5$self = _getSelf5.self, _m)._) === null || _assertClassBrand$_37 === void 0 ? void 0 : _assertClassBrand$_37.call(_getSelf5$self); - (_getSelf6 = (_ref28 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref28 === void 0 || (_ref28$getSelf = _ref28.getSelf) === null || _ref28$getSelf === void 0 ? void 0 : _ref28$getSelf.call(_ref28)) === null || _getSelf6 === void 0 ? void 0 : (_assertClassBrand$_38 = _assertClassBrand(Foo, _getSelf6$self = _getSelf6.self, _m)._) === null || _assertClassBrand$_38 === void 0 ? void 0 : _assertClassBrand$_38.call(_getSelf6$self); + o === null || o === void 0 ? void 0 : (_babelHelpers$assertC11 = babelHelpers.assertClassBrand(Foo, _o$Foo = o.Foo, _m)._) === null || _babelHelpers$assertC11 === void 0 ? void 0 : _babelHelpers$assertC11.call(_o$Foo); + o === null || o === void 0 ? void 0 : (_babelHelpers$assertC12 = babelHelpers.assertClassBrand(Foo, _o$Foo2 = o.Foo, _m)._) === null || _babelHelpers$assertC12 === void 0 ? void 0 : _babelHelpers$assertC12.call(_o$Foo2).toString; + o === null || o === void 0 ? void 0 : (_babelHelpers$assertC13 = babelHelpers.assertClassBrand(Foo, _o$Foo3 = o.Foo, _m)._) === null || _babelHelpers$assertC13 === void 0 ? void 0 : _babelHelpers$assertC13.call(_o$Foo3).toString(); + (_deep$very$o = deep === null || deep === void 0 ? void 0 : deep.very.o) === null || _deep$very$o === void 0 ? void 0 : (_babelHelpers$assertC14 = babelHelpers.assertClassBrand(Foo, _deep$very$o$Foo = _deep$very$o.Foo, _m)._) === null || _babelHelpers$assertC14 === void 0 ? void 0 : _babelHelpers$assertC14.call(_deep$very$o$Foo); + (_deep$very$o2 = deep === null || deep === void 0 ? void 0 : deep.very.o) === null || _deep$very$o2 === void 0 ? void 0 : (_babelHelpers$assertC15 = babelHelpers.assertClassBrand(Foo, _deep$very$o2$Foo = _deep$very$o2.Foo, _m)._) === null || _babelHelpers$assertC15 === void 0 ? void 0 : _babelHelpers$assertC15.call(_deep$very$o2$Foo).toString; + (_deep$very$o3 = deep === null || deep === void 0 ? void 0 : deep.very.o) === null || _deep$very$o3 === void 0 ? void 0 : (_babelHelpers$assertC16 = babelHelpers.assertClassBrand(Foo, _deep$very$o3$Foo = _deep$very$o3.Foo, _m)._) === null || _babelHelpers$assertC16 === void 0 ? void 0 : _babelHelpers$assertC16.call(_deep$very$o3$Foo).toString(); + (_ref13 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _babelHelpers$assertC = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._, _m)._) === null || _ref13 === void 0 || _ref13.call(_babelHelpers$assertC); + (_ref14 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _babelHelpers$assertC2 = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.self, _m)._) === null || _ref14 === void 0 || _ref14.call(_babelHelpers$assertC2); + (_ref = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref === void 0 ? void 0 : (_babelHelpers$assertC17 = babelHelpers.assertClassBrand(Foo, _ref$self = _ref.self, _m)._) === null || _babelHelpers$assertC17 === void 0 ? void 0 : _babelHelpers$assertC17.call(_ref$self); + (_ref2 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.self) === null || _ref2 === void 0 ? void 0 : (_babelHelpers$assertC18 = babelHelpers.assertClassBrand(Foo, _ref2$self = _ref2.self, _m)._) === null || _babelHelpers$assertC18 === void 0 ? void 0 : _babelHelpers$assertC18.call(_ref2$self); + (_self2 = (_ref15 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref15 === void 0 ? void 0 : _ref15.self) === null || _self2 === void 0 ? void 0 : (_babelHelpers$assertC19 = babelHelpers.assertClassBrand(Foo, _self2$self = _self2.self, _m)._) === null || _babelHelpers$assertC19 === void 0 ? void 0 : _babelHelpers$assertC19.call(_self2$self); + (_ref16 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _babelHelpers$assertC3 = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.getSelf(), _m)._) === null || _ref16 === void 0 || _ref16.call(_babelHelpers$assertC3); + (_ref3 = o === null || o === void 0 ? void 0 : (_babelHelpers$assertC4 = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._).getSelf) === null || _ref3 === void 0 ? void 0 : (_babelHelpers$assertC20 = babelHelpers.assertClassBrand(Foo, _ref3$call = _ref3.call(_babelHelpers$assertC4), _m)._) === null || _babelHelpers$assertC20 === void 0 ? void 0 : _babelHelpers$assertC20.call(_ref3$call); + (_ref4 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref4 === void 0 ? void 0 : (_babelHelpers$assertC21 = babelHelpers.assertClassBrand(Foo, _ref4$getSelf = _ref4.getSelf(), _m)._) === null || _babelHelpers$assertC21 === void 0 ? void 0 : _babelHelpers$assertC21.call(_ref4$getSelf); + (_getSelf = (_ref17 = _ref5 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref17 === void 0 ? void 0 : _ref17.getSelf) === null || _getSelf === void 0 ? void 0 : (_babelHelpers$assertC22 = babelHelpers.assertClassBrand(Foo, _getSelf$call = _getSelf.call(_ref5), _m)._) === null || _babelHelpers$assertC22 === void 0 ? void 0 : _babelHelpers$assertC22.call(_getSelf$call); + (_ref6 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.getSelf()) === null || _ref6 === void 0 ? void 0 : (_babelHelpers$assertC23 = babelHelpers.assertClassBrand(Foo, _ref6$self = _ref6.self, _m)._) === null || _babelHelpers$assertC23 === void 0 ? void 0 : _babelHelpers$assertC23.call(_ref6$self); + (_call = (_ref18 = o === null || o === void 0 ? void 0 : (_babelHelpers$assertC5 = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._).getSelf) === null || _ref18 === void 0 ? void 0 : _ref18.call(_babelHelpers$assertC5)) === null || _call === void 0 ? void 0 : (_babelHelpers$assertC24 = babelHelpers.assertClassBrand(Foo, _call$self = _call.self, _m)._) === null || _babelHelpers$assertC24 === void 0 ? void 0 : _babelHelpers$assertC24.call(_call$self); + (_getSelf2 = (_ref19 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref19 === void 0 ? void 0 : _ref19.getSelf()) === null || _getSelf2 === void 0 ? void 0 : (_babelHelpers$assertC25 = babelHelpers.assertClassBrand(Foo, _getSelf2$self = _getSelf2.self, _m)._) === null || _babelHelpers$assertC25 === void 0 ? void 0 : _babelHelpers$assertC25.call(_getSelf2$self); + (_getSelf3 = (_ref20 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref20 === void 0 || (_ref20$getSelf = _ref20.getSelf) === null || _ref20$getSelf === void 0 ? void 0 : _ref20$getSelf.call(_ref20)) === null || _getSelf3 === void 0 ? void 0 : (_babelHelpers$assertC26 = babelHelpers.assertClassBrand(Foo, _getSelf3$self = _getSelf3.self, _m)._) === null || _babelHelpers$assertC26 === void 0 ? void 0 : _babelHelpers$assertC26.call(_getSelf3$self); + fn === null || fn === void 0 ? void 0 : (_babelHelpers$assertC27 = babelHelpers.assertClassBrand(Foo, _fn$Foo = fn().Foo, _m)._) === null || _babelHelpers$assertC27 === void 0 ? void 0 : _babelHelpers$assertC27.call(_fn$Foo); + fn === null || fn === void 0 ? void 0 : (_babelHelpers$assertC28 = babelHelpers.assertClassBrand(Foo, _fn$Foo2 = fn().Foo, _m)._) === null || _babelHelpers$assertC28 === void 0 ? void 0 : _babelHelpers$assertC28.call(_fn$Foo2).toString; + fn === null || fn === void 0 ? void 0 : (_babelHelpers$assertC29 = babelHelpers.assertClassBrand(Foo, _fn$Foo3 = fn().Foo, _m)._) === null || _babelHelpers$assertC29 === void 0 ? void 0 : _babelHelpers$assertC29.call(_fn$Foo3).toString(); + (_fnDeep$very$o = fnDeep === null || fnDeep === void 0 ? void 0 : fnDeep().very.o) === null || _fnDeep$very$o === void 0 ? void 0 : (_babelHelpers$assertC30 = babelHelpers.assertClassBrand(Foo, _fnDeep$very$o$Foo = _fnDeep$very$o.Foo, _m)._) === null || _babelHelpers$assertC30 === void 0 ? void 0 : _babelHelpers$assertC30.call(_fnDeep$very$o$Foo); + (_fnDeep$very$o2 = fnDeep === null || fnDeep === void 0 ? void 0 : fnDeep().very.o) === null || _fnDeep$very$o2 === void 0 ? void 0 : (_babelHelpers$assertC31 = babelHelpers.assertClassBrand(Foo, _fnDeep$very$o2$Foo = _fnDeep$very$o2.Foo, _m)._) === null || _babelHelpers$assertC31 === void 0 ? void 0 : _babelHelpers$assertC31.call(_fnDeep$very$o2$Foo).toString; + (_fnDeep$very$o3 = fnDeep === null || fnDeep === void 0 ? void 0 : fnDeep().very.o) === null || _fnDeep$very$o3 === void 0 ? void 0 : (_babelHelpers$assertC32 = babelHelpers.assertClassBrand(Foo, _fnDeep$very$o3$Foo = _fnDeep$very$o3.Foo, _m)._) === null || _babelHelpers$assertC32 === void 0 ? void 0 : _babelHelpers$assertC32.call(_fnDeep$very$o3$Foo).toString(); + (_ref21 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _babelHelpers$assertC6 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._, _m)._) === null || _ref21 === void 0 || _ref21.call(_babelHelpers$assertC6); + (_ref22 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _babelHelpers$assertC7 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.self, _m)._) === null || _ref22 === void 0 || _ref22.call(_babelHelpers$assertC7); + (_ref7 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref7 === void 0 ? void 0 : (_babelHelpers$assertC33 = babelHelpers.assertClassBrand(Foo, _ref7$self = _ref7.self, _m)._) === null || _babelHelpers$assertC33 === void 0 ? void 0 : _babelHelpers$assertC33.call(_ref7$self); + (_ref8 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.self) === null || _ref8 === void 0 ? void 0 : (_babelHelpers$assertC34 = babelHelpers.assertClassBrand(Foo, _ref8$self = _ref8.self, _m)._) === null || _babelHelpers$assertC34 === void 0 ? void 0 : _babelHelpers$assertC34.call(_ref8$self); + (_self3 = (_ref23 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref23 === void 0 ? void 0 : _ref23.self) === null || _self3 === void 0 ? void 0 : (_babelHelpers$assertC35 = babelHelpers.assertClassBrand(Foo, _self3$self = _self3.self, _m)._) === null || _babelHelpers$assertC35 === void 0 ? void 0 : _babelHelpers$assertC35.call(_self3$self); + (_ref24 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _babelHelpers$assertC8 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.getSelf(), _m)._) === null || _ref24 === void 0 || _ref24.call(_babelHelpers$assertC8); + (_ref9 = fn === null || fn === void 0 ? void 0 : (_babelHelpers$assertC9 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._).getSelf) === null || _ref9 === void 0 ? void 0 : (_babelHelpers$assertC36 = babelHelpers.assertClassBrand(Foo, _ref9$call = _ref9.call(_babelHelpers$assertC9), _m)._) === null || _babelHelpers$assertC36 === void 0 ? void 0 : _babelHelpers$assertC36.call(_ref9$call); + (_ref10 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref10 === void 0 ? void 0 : (_babelHelpers$assertC37 = babelHelpers.assertClassBrand(Foo, _ref10$getSelf = _ref10.getSelf(), _m)._) === null || _babelHelpers$assertC37 === void 0 ? void 0 : _babelHelpers$assertC37.call(_ref10$getSelf); + (_getSelf4 = (_ref25 = _ref11 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref25 === void 0 ? void 0 : _ref25.getSelf) === null || _getSelf4 === void 0 ? void 0 : (_babelHelpers$assertC38 = babelHelpers.assertClassBrand(Foo, _getSelf4$call = _getSelf4.call(_ref11), _m)._) === null || _babelHelpers$assertC38 === void 0 ? void 0 : _babelHelpers$assertC38.call(_getSelf4$call); + (_ref12 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.getSelf()) === null || _ref12 === void 0 ? void 0 : (_babelHelpers$assertC39 = babelHelpers.assertClassBrand(Foo, _ref12$self = _ref12.self, _m)._) === null || _babelHelpers$assertC39 === void 0 ? void 0 : _babelHelpers$assertC39.call(_ref12$self); + (_call2 = (_ref26 = fn === null || fn === void 0 ? void 0 : (_babelHelpers$assertC10 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._).getSelf) === null || _ref26 === void 0 ? void 0 : _ref26.call(_babelHelpers$assertC10)) === null || _call2 === void 0 ? void 0 : (_babelHelpers$assertC40 = babelHelpers.assertClassBrand(Foo, _call2$self = _call2.self, _m)._) === null || _babelHelpers$assertC40 === void 0 ? void 0 : _babelHelpers$assertC40.call(_call2$self); + (_getSelf5 = (_ref27 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref27 === void 0 ? void 0 : _ref27.getSelf()) === null || _getSelf5 === void 0 ? void 0 : (_babelHelpers$assertC41 = babelHelpers.assertClassBrand(Foo, _getSelf5$self = _getSelf5.self, _m)._) === null || _babelHelpers$assertC41 === void 0 ? void 0 : _babelHelpers$assertC41.call(_getSelf5$self); + (_getSelf6 = (_ref28 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref28 === void 0 || (_ref28$getSelf = _ref28.getSelf) === null || _ref28$getSelf === void 0 ? void 0 : _ref28$getSelf.call(_ref28)) === null || _getSelf6 === void 0 ? void 0 : (_babelHelpers$assertC42 = babelHelpers.assertClassBrand(Foo, _getSelf6$self = _getSelf6.self, _m)._) === null || _babelHelpers$assertC42 === void 0 ? void 0 : _babelHelpers$assertC42.call(_getSelf6$self); } } _Foo = Foo; @@ -69,7 +68,7 @@ var _x = { }; var _m = { _: function () { - return _assertClassBrand(_Foo, this, _x)._; + return babelHelpers.assertClassBrand(_Foo, this, _x)._; } }; var _self = { diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-member-optional-call/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-member-optional-call/output.js index 96c256594257e8..0f37770e8a7af9 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-member-optional-call/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-member-optional-call/output.js @@ -1,11 +1,10 @@ var _Foo; -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } class Foo { static getSelf() { return this; } static test() { - var _o$Foo, _o$Foo2, _o$Foo3, _deep$very$o, _deep$very$o$Foo, _deep$very$o2, _deep$very$o2$Foo, _deep$very$o3, _deep$very$o3$Foo, _assertClassBrand$_, _assertClassBrand$_$s, _ref, _ref$self, _ref2, _ref2$self, _self2, _self2$self, _assertClassBrand$_$g, _assertClassBrand$_2, _ref3, _ref3$call, _ref4, _ref4$getSelf, _getSelf, _ref5, _getSelf$call, _ref6, _ref6$self, _assertClassBrand$_3, _call, _call$self, _getSelf2, _getSelf2$self, _getSelf3, _getSelf3$self, _fn$Foo, _fn$Foo2, _fn$Foo3, _fnDeep$very$o, _fnDeep$very$o$Foo, _fnDeep$very$o2, _fnDeep$very$o2$Foo, _fnDeep$very$o3, _fnDeep$very$o3$Foo, _assertClassBrand$_4, _assertClassBrand$_$s2, _ref7, _ref7$self, _ref8, _ref8$self, _self3, _self3$self, _assertClassBrand$_$g2, _assertClassBrand$_5, _ref9, _ref9$call, _ref10, _ref10$getSelf, _getSelf4, _ref11, _getSelf4$call, _ref12, _ref12$self, _assertClassBrand$_6, _call2, _call2$self, _getSelf5, _getSelf5$self, _getSelf6, _getSelf6$self; + var _o$Foo, _o$Foo2, _o$Foo3, _deep$very$o, _deep$very$o$Foo, _deep$very$o2, _deep$very$o2$Foo, _deep$very$o3, _deep$very$o3$Foo, _babelHelpers$assertC, _babelHelpers$assertC2, _ref, _ref$self, _ref2, _ref2$self, _self2, _self2$self, _babelHelpers$assertC3, _babelHelpers$assertC4, _ref3, _ref3$call, _ref4, _ref4$getSelf, _getSelf, _ref5, _getSelf$call, _ref6, _ref6$self, _babelHelpers$assertC5, _call, _call$self, _getSelf2, _getSelf2$self, _getSelf3, _getSelf3$self, _fn$Foo, _fn$Foo2, _fn$Foo3, _fnDeep$very$o, _fnDeep$very$o$Foo, _fnDeep$very$o2, _fnDeep$very$o2$Foo, _fnDeep$very$o3, _fnDeep$very$o3$Foo, _babelHelpers$assertC6, _babelHelpers$assertC7, _ref7, _ref7$self, _ref8, _ref8$self, _self3, _self3$self, _babelHelpers$assertC8, _babelHelpers$assertC9, _ref9, _ref9$call, _ref10, _ref10$getSelf, _getSelf4, _ref11, _getSelf4$call, _ref12, _ref12$self, _babelHelpers$assertC10, _call2, _call2$self, _getSelf5, _getSelf5$self, _getSelf6, _getSelf6$self; const o = { Foo: Foo }; @@ -23,44 +22,44 @@ class Foo { _m._?.call(Foo); _m._?.call(Foo).toString; _m._?.call(Foo).toString(); - o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _o$Foo = o.Foo, _m)._?.call(_o$Foo); - o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _o$Foo2 = o.Foo, _m)._?.call(_o$Foo2).toString; - o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _o$Foo3 = o.Foo, _m)._?.call(_o$Foo3).toString(); - (_deep$very$o = deep?.very.o) === null || _deep$very$o === void 0 ? void 0 : _assertClassBrand(Foo, _deep$very$o$Foo = _deep$very$o.Foo, _m)._?.call(_deep$very$o$Foo); - (_deep$very$o2 = deep?.very.o) === null || _deep$very$o2 === void 0 ? void 0 : _assertClassBrand(Foo, _deep$very$o2$Foo = _deep$very$o2.Foo, _m)._?.call(_deep$very$o2$Foo).toString; - (_deep$very$o3 = deep?.very.o) === null || _deep$very$o3 === void 0 ? void 0 : _assertClassBrand(Foo, _deep$very$o3$Foo = _deep$very$o3.Foo, _m)._?.call(_deep$very$o3$Foo).toString(); - (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand$_ = _assertClassBrand(Foo, o.Foo, _self)._, _m)._)?.call(_assertClassBrand$_); - (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand$_$s = _assertClassBrand(Foo, o.Foo, _self)._.self, _m)._)?.call(_assertClassBrand$_$s); - (_ref = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref === void 0 ? void 0 : _assertClassBrand(Foo, _ref$self = _ref.self, _m)._?.call(_ref$self); - (_ref2 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._.self) === null || _ref2 === void 0 ? void 0 : _assertClassBrand(Foo, _ref2$self = _ref2.self, _m)._?.call(_ref2$self); - (_self2 = (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._)?.self) === null || _self2 === void 0 ? void 0 : _assertClassBrand(Foo, _self2$self = _self2.self, _m)._?.call(_self2$self); - (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand$_$g = _assertClassBrand(Foo, o.Foo, _self)._.getSelf(), _m)._)?.call(_assertClassBrand$_$g); - (_ref3 = o === null || o === void 0 ? void 0 : (_assertClassBrand$_2 = _assertClassBrand(Foo, o.Foo, _self)._).getSelf) === null || _ref3 === void 0 ? void 0 : _assertClassBrand(Foo, _ref3$call = _ref3.call(_assertClassBrand$_2), _m)._?.call(_ref3$call); - (_ref4 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref4 === void 0 ? void 0 : _assertClassBrand(Foo, _ref4$getSelf = _ref4.getSelf(), _m)._?.call(_ref4$getSelf); - (_getSelf = (_ref5 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._)?.getSelf) === null || _getSelf === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf$call = _getSelf.call(_ref5), _m)._?.call(_getSelf$call); - (_ref6 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._.getSelf()) === null || _ref6 === void 0 ? void 0 : _assertClassBrand(Foo, _ref6$self = _ref6.self, _m)._?.call(_ref6$self); - (_call = (o === null || o === void 0 ? void 0 : (_assertClassBrand$_3 = _assertClassBrand(Foo, o.Foo, _self)._).getSelf)?.call(_assertClassBrand$_3)) === null || _call === void 0 ? void 0 : _assertClassBrand(Foo, _call$self = _call.self, _m)._?.call(_call$self); - (_getSelf2 = (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._)?.getSelf()) === null || _getSelf2 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf2$self = _getSelf2.self, _m)._?.call(_getSelf2$self); - (_getSelf3 = (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._)?.getSelf?.()) === null || _getSelf3 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf3$self = _getSelf3.self, _m)._?.call(_getSelf3$self); - fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, _fn$Foo = fn().Foo, _m)._?.call(_fn$Foo); - fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, _fn$Foo2 = fn().Foo, _m)._?.call(_fn$Foo2).toString; - fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, _fn$Foo3 = fn().Foo, _m)._?.call(_fn$Foo3).toString(); - (_fnDeep$very$o = fnDeep?.().very.o) === null || _fnDeep$very$o === void 0 ? void 0 : _assertClassBrand(Foo, _fnDeep$very$o$Foo = _fnDeep$very$o.Foo, _m)._?.call(_fnDeep$very$o$Foo); - (_fnDeep$very$o2 = fnDeep?.().very.o) === null || _fnDeep$very$o2 === void 0 ? void 0 : _assertClassBrand(Foo, _fnDeep$very$o2$Foo = _fnDeep$very$o2.Foo, _m)._?.call(_fnDeep$very$o2$Foo).toString; - (_fnDeep$very$o3 = fnDeep?.().very.o) === null || _fnDeep$very$o3 === void 0 ? void 0 : _assertClassBrand(Foo, _fnDeep$very$o3$Foo = _fnDeep$very$o3.Foo, _m)._?.call(_fnDeep$very$o3$Foo).toString(); - (fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand$_4 = _assertClassBrand(Foo, fn().Foo, _self)._, _m)._)?.call(_assertClassBrand$_4); - (fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand$_$s2 = _assertClassBrand(Foo, fn().Foo, _self)._.self, _m)._)?.call(_assertClassBrand$_$s2); - (_ref7 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref7 === void 0 ? void 0 : _assertClassBrand(Foo, _ref7$self = _ref7.self, _m)._?.call(_ref7$self); - (_ref8 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._.self) === null || _ref8 === void 0 ? void 0 : _assertClassBrand(Foo, _ref8$self = _ref8.self, _m)._?.call(_ref8$self); - (_self3 = (fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._)?.self) === null || _self3 === void 0 ? void 0 : _assertClassBrand(Foo, _self3$self = _self3.self, _m)._?.call(_self3$self); - (fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand$_$g2 = _assertClassBrand(Foo, fn().Foo, _self)._.getSelf(), _m)._)?.call(_assertClassBrand$_$g2); - (_ref9 = fn === null || fn === void 0 ? void 0 : (_assertClassBrand$_5 = _assertClassBrand(Foo, fn().Foo, _self)._).getSelf) === null || _ref9 === void 0 ? void 0 : _assertClassBrand(Foo, _ref9$call = _ref9.call(_assertClassBrand$_5), _m)._?.call(_ref9$call); - (_ref10 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref10 === void 0 ? void 0 : _assertClassBrand(Foo, _ref10$getSelf = _ref10.getSelf(), _m)._?.call(_ref10$getSelf); - (_getSelf4 = (_ref11 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf) === null || _getSelf4 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf4$call = _getSelf4.call(_ref11), _m)._?.call(_getSelf4$call); - (_ref12 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._.getSelf()) === null || _ref12 === void 0 ? void 0 : _assertClassBrand(Foo, _ref12$self = _ref12.self, _m)._?.call(_ref12$self); - (_call2 = (fn === null || fn === void 0 ? void 0 : (_assertClassBrand$_6 = _assertClassBrand(Foo, fn().Foo, _self)._).getSelf)?.call(_assertClassBrand$_6)) === null || _call2 === void 0 ? void 0 : _assertClassBrand(Foo, _call2$self = _call2.self, _m)._?.call(_call2$self); - (_getSelf5 = (fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf()) === null || _getSelf5 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf5$self = _getSelf5.self, _m)._?.call(_getSelf5$self); - (_getSelf6 = (fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf?.()) === null || _getSelf6 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf6$self = _getSelf6.self, _m)._?.call(_getSelf6$self); + o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _o$Foo = o.Foo, _m)._?.call(_o$Foo); + o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _o$Foo2 = o.Foo, _m)._?.call(_o$Foo2).toString; + o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _o$Foo3 = o.Foo, _m)._?.call(_o$Foo3).toString(); + (_deep$very$o = deep?.very.o) === null || _deep$very$o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _deep$very$o$Foo = _deep$very$o.Foo, _m)._?.call(_deep$very$o$Foo); + (_deep$very$o2 = deep?.very.o) === null || _deep$very$o2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _deep$very$o2$Foo = _deep$very$o2.Foo, _m)._?.call(_deep$very$o2$Foo).toString; + (_deep$very$o3 = deep?.very.o) === null || _deep$very$o3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _deep$very$o3$Foo = _deep$very$o3.Foo, _m)._?.call(_deep$very$o3$Foo).toString(); + (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _babelHelpers$assertC = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._, _m)._)?.call(_babelHelpers$assertC); + (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _babelHelpers$assertC2 = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.self, _m)._)?.call(_babelHelpers$assertC2); + (_ref = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref$self = _ref.self, _m)._?.call(_ref$self); + (_ref2 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.self) === null || _ref2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref2$self = _ref2.self, _m)._?.call(_ref2$self); + (_self2 = (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._)?.self) === null || _self2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self2$self = _self2.self, _m)._?.call(_self2$self); + (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _babelHelpers$assertC3 = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.getSelf(), _m)._)?.call(_babelHelpers$assertC3); + (_ref3 = o === null || o === void 0 ? void 0 : (_babelHelpers$assertC4 = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._).getSelf) === null || _ref3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref3$call = _ref3.call(_babelHelpers$assertC4), _m)._?.call(_ref3$call); + (_ref4 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref4 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref4$getSelf = _ref4.getSelf(), _m)._?.call(_ref4$getSelf); + (_getSelf = (_ref5 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._)?.getSelf) === null || _getSelf === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf$call = _getSelf.call(_ref5), _m)._?.call(_getSelf$call); + (_ref6 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.getSelf()) === null || _ref6 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref6$self = _ref6.self, _m)._?.call(_ref6$self); + (_call = (o === null || o === void 0 ? void 0 : (_babelHelpers$assertC5 = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._).getSelf)?.call(_babelHelpers$assertC5)) === null || _call === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _call$self = _call.self, _m)._?.call(_call$self); + (_getSelf2 = (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._)?.getSelf()) === null || _getSelf2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf2$self = _getSelf2.self, _m)._?.call(_getSelf2$self); + (_getSelf3 = (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._)?.getSelf?.()) === null || _getSelf3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf3$self = _getSelf3.self, _m)._?.call(_getSelf3$self); + fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fn$Foo = fn().Foo, _m)._?.call(_fn$Foo); + fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fn$Foo2 = fn().Foo, _m)._?.call(_fn$Foo2).toString; + fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fn$Foo3 = fn().Foo, _m)._?.call(_fn$Foo3).toString(); + (_fnDeep$very$o = fnDeep?.().very.o) === null || _fnDeep$very$o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fnDeep$very$o$Foo = _fnDeep$very$o.Foo, _m)._?.call(_fnDeep$very$o$Foo); + (_fnDeep$very$o2 = fnDeep?.().very.o) === null || _fnDeep$very$o2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fnDeep$very$o2$Foo = _fnDeep$very$o2.Foo, _m)._?.call(_fnDeep$very$o2$Foo).toString; + (_fnDeep$very$o3 = fnDeep?.().very.o) === null || _fnDeep$very$o3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fnDeep$very$o3$Foo = _fnDeep$very$o3.Foo, _m)._?.call(_fnDeep$very$o3$Foo).toString(); + (fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _babelHelpers$assertC6 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._, _m)._)?.call(_babelHelpers$assertC6); + (fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _babelHelpers$assertC7 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.self, _m)._)?.call(_babelHelpers$assertC7); + (_ref7 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref7 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref7$self = _ref7.self, _m)._?.call(_ref7$self); + (_ref8 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.self) === null || _ref8 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref8$self = _ref8.self, _m)._?.call(_ref8$self); + (_self3 = (fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._)?.self) === null || _self3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self3$self = _self3.self, _m)._?.call(_self3$self); + (fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _babelHelpers$assertC8 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.getSelf(), _m)._)?.call(_babelHelpers$assertC8); + (_ref9 = fn === null || fn === void 0 ? void 0 : (_babelHelpers$assertC9 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._).getSelf) === null || _ref9 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref9$call = _ref9.call(_babelHelpers$assertC9), _m)._?.call(_ref9$call); + (_ref10 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref10 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref10$getSelf = _ref10.getSelf(), _m)._?.call(_ref10$getSelf); + (_getSelf4 = (_ref11 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf) === null || _getSelf4 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf4$call = _getSelf4.call(_ref11), _m)._?.call(_getSelf4$call); + (_ref12 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.getSelf()) === null || _ref12 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref12$self = _ref12.self, _m)._?.call(_ref12$self); + (_call2 = (fn === null || fn === void 0 ? void 0 : (_babelHelpers$assertC10 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._).getSelf)?.call(_babelHelpers$assertC10)) === null || _call2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _call2$self = _call2.self, _m)._?.call(_call2$self); + (_getSelf5 = (fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf()) === null || _getSelf5 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf5$self = _getSelf5.self, _m)._?.call(_getSelf5$self); + (_getSelf6 = (fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf?.()) === null || _getSelf6 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf6$self = _getSelf6.self, _m)._?.call(_getSelf6$self); } } _Foo = Foo; @@ -69,7 +68,7 @@ var _x = { }; var _m = { _: function () { - return _assertClassBrand(_Foo, this, _x)._; + return babelHelpers.assertClassBrand(_Foo, this, _x)._; } }; var _self = { diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-optional-member-call-with-transform/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-optional-member-call-with-transform/output.js index fa1bc6ef0bfbc3..24bd43ac6347a2 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-optional-member-call-with-transform/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-optional-member-call-with-transform/output.js @@ -1,11 +1,10 @@ var _Foo; -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } class Foo { static getSelf() { return this; } static test() { - var _o$Foo, _o$Foo2, _o$Foo3, _deep$very$o$Foo, _deep$very$o$Foo2, _deep$very$o$Foo3, _ref, _ref2, _self2, _self3, _self$self, _ref3, _assertClassBrand$_, _call, _getSelf, _getSelf2, _self4, _assertClassBrand$_2, _call$self, _getSelf$self, _getSelf$self2, _fn$Foo, _fn$Foo2, _fn$Foo3, _fnDeep$very$o$Foo, _fnDeep$very$o$Foo2, _fnDeep$very$o$Foo3, _ref4, _ref5, _self5, _self6, _self$self2, _ref6, _assertClassBrand$_3, _call2, _getSelf3, _getSelf4, _self7, _assertClassBrand$_4, _call$self2, _getSelf$self3, _getSelf$self4, _deep$very$o, _deep$very$o2, _deep$very$o3, _ref7, _ref8, _ref9, _ref10, _ref11, _ref12, _ref12$getSelf, _ref13, _ref14, _ref15, _ref16, _ref16$getSelf, _fnDeep$very$o, _fnDeep$very$o2, _fnDeep$very$o3, _ref17, _ref18, _ref19, _ref20, _ref21, _ref22, _ref22$getSelf, _ref23, _ref24, _ref25, _ref26, _ref26$getSelf; + var _o$Foo, _o$Foo2, _o$Foo3, _deep$very$o$Foo, _deep$very$o$Foo2, _deep$very$o$Foo3, _ref, _ref2, _self2, _self3, _self$self, _ref3, _babelHelpers$assertC, _call, _getSelf, _getSelf2, _self4, _babelHelpers$assertC2, _call$self, _getSelf$self, _getSelf$self2, _fn$Foo, _fn$Foo2, _fn$Foo3, _fnDeep$very$o$Foo, _fnDeep$very$o$Foo2, _fnDeep$very$o$Foo3, _ref4, _ref5, _self5, _self6, _self$self2, _ref6, _babelHelpers$assertC3, _call2, _getSelf3, _getSelf4, _self7, _babelHelpers$assertC4, _call$self2, _getSelf$self3, _getSelf$self4, _deep$very$o, _deep$very$o2, _deep$very$o3, _ref7, _ref8, _ref9, _ref10, _ref11, _ref12, _ref12$getSelf, _ref13, _ref14, _ref15, _ref16, _ref16$getSelf, _fnDeep$very$o, _fnDeep$very$o2, _fnDeep$very$o3, _ref17, _ref18, _ref19, _ref20, _ref21, _ref22, _ref22$getSelf, _ref23, _ref24, _ref25, _ref26, _ref26$getSelf; const o = { Foo: Foo }; @@ -23,44 +22,44 @@ class Foo { Foo === null || Foo === void 0 ? void 0 : _m._.call(Foo); Foo === null || Foo === void 0 ? void 0 : _m._.call(Foo).toString; Foo === null || Foo === void 0 ? void 0 : _m._.call(Foo).toString(); - (_o$Foo = o === null || o === void 0 ? void 0 : o.Foo) === null || _o$Foo === void 0 ? void 0 : _assertClassBrand(Foo, _o$Foo, _m)._.call(_o$Foo); - (_o$Foo2 = o === null || o === void 0 ? void 0 : o.Foo) === null || _o$Foo2 === void 0 ? void 0 : _assertClassBrand(Foo, _o$Foo2, _m)._.call(_o$Foo2).toString; - (_o$Foo3 = o === null || o === void 0 ? void 0 : o.Foo) === null || _o$Foo3 === void 0 ? void 0 : _assertClassBrand(Foo, _o$Foo3, _m)._.call(_o$Foo3).toString(); - (_deep$very$o$Foo = deep === null || deep === void 0 || (_deep$very$o = deep.very.o) === null || _deep$very$o === void 0 ? void 0 : _deep$very$o.Foo) === null || _deep$very$o$Foo === void 0 ? void 0 : _assertClassBrand(Foo, _deep$very$o$Foo, _m)._.call(_deep$very$o$Foo); - (_deep$very$o$Foo2 = deep === null || deep === void 0 || (_deep$very$o2 = deep.very.o) === null || _deep$very$o2 === void 0 ? void 0 : _deep$very$o2.Foo) === null || _deep$very$o$Foo2 === void 0 ? void 0 : _assertClassBrand(Foo, _deep$very$o$Foo2, _m)._.call(_deep$very$o$Foo2).toString; - (_deep$very$o$Foo3 = deep === null || deep === void 0 || (_deep$very$o3 = deep.very.o) === null || _deep$very$o3 === void 0 ? void 0 : _deep$very$o3.Foo) === null || _deep$very$o$Foo3 === void 0 ? void 0 : _assertClassBrand(Foo, _deep$very$o$Foo3, _m)._.call(_deep$very$o$Foo3).toString(); - (_ref = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref === void 0 ? void 0 : _assertClassBrand(Foo, _ref, _m)._.call(_ref); - (_ref2 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._.self) === null || _ref2 === void 0 ? void 0 : _assertClassBrand(Foo, _ref2, _m)._.call(_ref2); - (_self2 = (_ref7 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref7 === void 0 ? void 0 : _ref7.self) === null || _self2 === void 0 ? void 0 : _assertClassBrand(Foo, _self2, _m)._.call(_self2); - (_self3 = (_ref8 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._.self) === null || _ref8 === void 0 ? void 0 : _ref8.self) === null || _self3 === void 0 ? void 0 : _assertClassBrand(Foo, _self3, _m)._.call(_self3); - (_self$self = (_ref9 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref9 === void 0 || (_ref9 = _ref9.self) === null || _ref9 === void 0 ? void 0 : _ref9.self) === null || _self$self === void 0 ? void 0 : _assertClassBrand(Foo, _self$self, _m)._.call(_self$self); - (_ref3 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._.getSelf()) === null || _ref3 === void 0 ? void 0 : _assertClassBrand(Foo, _ref3, _m)._.call(_ref3); - (_call = (_ref10 = o === null || o === void 0 ? void 0 : (_assertClassBrand$_ = _assertClassBrand(Foo, o.Foo, _self)._).getSelf) === null || _ref10 === void 0 ? void 0 : _ref10.call(_assertClassBrand$_)) === null || _call === void 0 ? void 0 : _assertClassBrand(Foo, _call, _m)._.call(_call); - (_getSelf = (_ref11 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref11 === void 0 ? void 0 : _ref11.getSelf()) === null || _getSelf === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf, _m)._.call(_getSelf); - (_getSelf2 = (_ref12 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref12 === void 0 || (_ref12$getSelf = _ref12.getSelf) === null || _ref12$getSelf === void 0 ? void 0 : _ref12$getSelf.call(_ref12)) === null || _getSelf2 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf2, _m)._.call(_getSelf2); - (_self4 = (_ref13 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._.getSelf()) === null || _ref13 === void 0 ? void 0 : _ref13.self) === null || _self4 === void 0 ? void 0 : _assertClassBrand(Foo, _self4, _m)._.call(_self4); - (_call$self = (_ref14 = o === null || o === void 0 ? void 0 : (_assertClassBrand$_2 = _assertClassBrand(Foo, o.Foo, _self)._).getSelf) === null || _ref14 === void 0 || (_ref14 = _ref14.call(_assertClassBrand$_2)) === null || _ref14 === void 0 ? void 0 : _ref14.self) === null || _call$self === void 0 ? void 0 : _assertClassBrand(Foo, _call$self, _m)._.call(_call$self); - (_getSelf$self = (_ref15 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref15 === void 0 || (_ref15 = _ref15.getSelf()) === null || _ref15 === void 0 ? void 0 : _ref15.self) === null || _getSelf$self === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf$self, _m)._.call(_getSelf$self); - (_getSelf$self2 = (_ref16 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref16 === void 0 || (_ref16$getSelf = _ref16.getSelf) === null || _ref16$getSelf === void 0 || (_ref16$getSelf = _ref16$getSelf.call(_ref16)) === null || _ref16$getSelf === void 0 ? void 0 : _ref16$getSelf.self) === null || _getSelf$self2 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf$self2, _m)._.call(_getSelf$self2); - (_fn$Foo = fn === null || fn === void 0 ? void 0 : fn().Foo) === null || _fn$Foo === void 0 ? void 0 : _assertClassBrand(Foo, _fn$Foo, _m)._.call(_fn$Foo); - (_fn$Foo2 = fn === null || fn === void 0 ? void 0 : fn().Foo) === null || _fn$Foo2 === void 0 ? void 0 : _assertClassBrand(Foo, _fn$Foo2, _m)._.call(_fn$Foo2).toString; - (_fn$Foo3 = fn === null || fn === void 0 ? void 0 : fn().Foo) === null || _fn$Foo3 === void 0 ? void 0 : _assertClassBrand(Foo, _fn$Foo3, _m)._.call(_fn$Foo3).toString(); - (_fnDeep$very$o$Foo = fnDeep === null || fnDeep === void 0 || (_fnDeep$very$o = fnDeep().very.o) === null || _fnDeep$very$o === void 0 ? void 0 : _fnDeep$very$o.Foo) === null || _fnDeep$very$o$Foo === void 0 ? void 0 : _assertClassBrand(Foo, _fnDeep$very$o$Foo, _m)._.call(_fnDeep$very$o$Foo); - (_fnDeep$very$o$Foo2 = fnDeep === null || fnDeep === void 0 || (_fnDeep$very$o2 = fnDeep().very.o) === null || _fnDeep$very$o2 === void 0 ? void 0 : _fnDeep$very$o2.Foo) === null || _fnDeep$very$o$Foo2 === void 0 ? void 0 : _assertClassBrand(Foo, _fnDeep$very$o$Foo2, _m)._.call(_fnDeep$very$o$Foo2).toString; - (_fnDeep$very$o$Foo3 = fnDeep === null || fnDeep === void 0 || (_fnDeep$very$o3 = fnDeep().very.o) === null || _fnDeep$very$o3 === void 0 ? void 0 : _fnDeep$very$o3.Foo) === null || _fnDeep$very$o$Foo3 === void 0 ? void 0 : _assertClassBrand(Foo, _fnDeep$very$o$Foo3, _m)._.call(_fnDeep$very$o$Foo3).toString(); - (_ref4 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref4 === void 0 ? void 0 : _assertClassBrand(Foo, _ref4, _m)._.call(_ref4); - (_ref5 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._.self) === null || _ref5 === void 0 ? void 0 : _assertClassBrand(Foo, _ref5, _m)._.call(_ref5); - (_self5 = (_ref17 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref17 === void 0 ? void 0 : _ref17.self) === null || _self5 === void 0 ? void 0 : _assertClassBrand(Foo, _self5, _m)._.call(_self5); - (_self6 = (_ref18 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._.self) === null || _ref18 === void 0 ? void 0 : _ref18.self) === null || _self6 === void 0 ? void 0 : _assertClassBrand(Foo, _self6, _m)._.call(_self6); - (_self$self2 = (_ref19 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref19 === void 0 || (_ref19 = _ref19.self) === null || _ref19 === void 0 ? void 0 : _ref19.self) === null || _self$self2 === void 0 ? void 0 : _assertClassBrand(Foo, _self$self2, _m)._.call(_self$self2); - (_ref6 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._.getSelf()) === null || _ref6 === void 0 ? void 0 : _assertClassBrand(Foo, _ref6, _m)._.call(_ref6); - (_call2 = (_ref20 = fn === null || fn === void 0 ? void 0 : (_assertClassBrand$_3 = _assertClassBrand(Foo, fn().Foo, _self)._).getSelf) === null || _ref20 === void 0 ? void 0 : _ref20.call(_assertClassBrand$_3)) === null || _call2 === void 0 ? void 0 : _assertClassBrand(Foo, _call2, _m)._.call(_call2); - (_getSelf3 = (_ref21 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref21 === void 0 ? void 0 : _ref21.getSelf()) === null || _getSelf3 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf3, _m)._.call(_getSelf3); - (_getSelf4 = (_ref22 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref22 === void 0 || (_ref22$getSelf = _ref22.getSelf) === null || _ref22$getSelf === void 0 ? void 0 : _ref22$getSelf.call(_ref22)) === null || _getSelf4 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf4, _m)._.call(_getSelf4); - (_self7 = (_ref23 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._.getSelf()) === null || _ref23 === void 0 ? void 0 : _ref23.self) === null || _self7 === void 0 ? void 0 : _assertClassBrand(Foo, _self7, _m)._.call(_self7); - (_call$self2 = (_ref24 = fn === null || fn === void 0 ? void 0 : (_assertClassBrand$_4 = _assertClassBrand(Foo, fn().Foo, _self)._).getSelf) === null || _ref24 === void 0 || (_ref24 = _ref24.call(_assertClassBrand$_4)) === null || _ref24 === void 0 ? void 0 : _ref24.self) === null || _call$self2 === void 0 ? void 0 : _assertClassBrand(Foo, _call$self2, _m)._.call(_call$self2); - (_getSelf$self3 = (_ref25 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref25 === void 0 || (_ref25 = _ref25.getSelf()) === null || _ref25 === void 0 ? void 0 : _ref25.self) === null || _getSelf$self3 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf$self3, _m)._.call(_getSelf$self3); - (_getSelf$self4 = (_ref26 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref26 === void 0 || (_ref26$getSelf = _ref26.getSelf) === null || _ref26$getSelf === void 0 || (_ref26$getSelf = _ref26$getSelf.call(_ref26)) === null || _ref26$getSelf === void 0 ? void 0 : _ref26$getSelf.self) === null || _getSelf$self4 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf$self4, _m)._.call(_getSelf$self4); + (_o$Foo = o === null || o === void 0 ? void 0 : o.Foo) === null || _o$Foo === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _o$Foo, _m)._.call(_o$Foo); + (_o$Foo2 = o === null || o === void 0 ? void 0 : o.Foo) === null || _o$Foo2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _o$Foo2, _m)._.call(_o$Foo2).toString; + (_o$Foo3 = o === null || o === void 0 ? void 0 : o.Foo) === null || _o$Foo3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _o$Foo3, _m)._.call(_o$Foo3).toString(); + (_deep$very$o$Foo = deep === null || deep === void 0 || (_deep$very$o = deep.very.o) === null || _deep$very$o === void 0 ? void 0 : _deep$very$o.Foo) === null || _deep$very$o$Foo === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _deep$very$o$Foo, _m)._.call(_deep$very$o$Foo); + (_deep$very$o$Foo2 = deep === null || deep === void 0 || (_deep$very$o2 = deep.very.o) === null || _deep$very$o2 === void 0 ? void 0 : _deep$very$o2.Foo) === null || _deep$very$o$Foo2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _deep$very$o$Foo2, _m)._.call(_deep$very$o$Foo2).toString; + (_deep$very$o$Foo3 = deep === null || deep === void 0 || (_deep$very$o3 = deep.very.o) === null || _deep$very$o3 === void 0 ? void 0 : _deep$very$o3.Foo) === null || _deep$very$o$Foo3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _deep$very$o$Foo3, _m)._.call(_deep$very$o$Foo3).toString(); + (_ref = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref, _m)._.call(_ref); + (_ref2 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.self) === null || _ref2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref2, _m)._.call(_ref2); + (_self2 = (_ref7 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref7 === void 0 ? void 0 : _ref7.self) === null || _self2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self2, _m)._.call(_self2); + (_self3 = (_ref8 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.self) === null || _ref8 === void 0 ? void 0 : _ref8.self) === null || _self3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self3, _m)._.call(_self3); + (_self$self = (_ref9 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref9 === void 0 || (_ref9 = _ref9.self) === null || _ref9 === void 0 ? void 0 : _ref9.self) === null || _self$self === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self$self, _m)._.call(_self$self); + (_ref3 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.getSelf()) === null || _ref3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref3, _m)._.call(_ref3); + (_call = (_ref10 = o === null || o === void 0 ? void 0 : (_babelHelpers$assertC = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._).getSelf) === null || _ref10 === void 0 ? void 0 : _ref10.call(_babelHelpers$assertC)) === null || _call === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _call, _m)._.call(_call); + (_getSelf = (_ref11 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref11 === void 0 ? void 0 : _ref11.getSelf()) === null || _getSelf === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf, _m)._.call(_getSelf); + (_getSelf2 = (_ref12 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref12 === void 0 || (_ref12$getSelf = _ref12.getSelf) === null || _ref12$getSelf === void 0 ? void 0 : _ref12$getSelf.call(_ref12)) === null || _getSelf2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf2, _m)._.call(_getSelf2); + (_self4 = (_ref13 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.getSelf()) === null || _ref13 === void 0 ? void 0 : _ref13.self) === null || _self4 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self4, _m)._.call(_self4); + (_call$self = (_ref14 = o === null || o === void 0 ? void 0 : (_babelHelpers$assertC2 = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._).getSelf) === null || _ref14 === void 0 || (_ref14 = _ref14.call(_babelHelpers$assertC2)) === null || _ref14 === void 0 ? void 0 : _ref14.self) === null || _call$self === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _call$self, _m)._.call(_call$self); + (_getSelf$self = (_ref15 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref15 === void 0 || (_ref15 = _ref15.getSelf()) === null || _ref15 === void 0 ? void 0 : _ref15.self) === null || _getSelf$self === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf$self, _m)._.call(_getSelf$self); + (_getSelf$self2 = (_ref16 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref16 === void 0 || (_ref16$getSelf = _ref16.getSelf) === null || _ref16$getSelf === void 0 || (_ref16$getSelf = _ref16$getSelf.call(_ref16)) === null || _ref16$getSelf === void 0 ? void 0 : _ref16$getSelf.self) === null || _getSelf$self2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf$self2, _m)._.call(_getSelf$self2); + (_fn$Foo = fn === null || fn === void 0 ? void 0 : fn().Foo) === null || _fn$Foo === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fn$Foo, _m)._.call(_fn$Foo); + (_fn$Foo2 = fn === null || fn === void 0 ? void 0 : fn().Foo) === null || _fn$Foo2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fn$Foo2, _m)._.call(_fn$Foo2).toString; + (_fn$Foo3 = fn === null || fn === void 0 ? void 0 : fn().Foo) === null || _fn$Foo3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fn$Foo3, _m)._.call(_fn$Foo3).toString(); + (_fnDeep$very$o$Foo = fnDeep === null || fnDeep === void 0 || (_fnDeep$very$o = fnDeep().very.o) === null || _fnDeep$very$o === void 0 ? void 0 : _fnDeep$very$o.Foo) === null || _fnDeep$very$o$Foo === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fnDeep$very$o$Foo, _m)._.call(_fnDeep$very$o$Foo); + (_fnDeep$very$o$Foo2 = fnDeep === null || fnDeep === void 0 || (_fnDeep$very$o2 = fnDeep().very.o) === null || _fnDeep$very$o2 === void 0 ? void 0 : _fnDeep$very$o2.Foo) === null || _fnDeep$very$o$Foo2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fnDeep$very$o$Foo2, _m)._.call(_fnDeep$very$o$Foo2).toString; + (_fnDeep$very$o$Foo3 = fnDeep === null || fnDeep === void 0 || (_fnDeep$very$o3 = fnDeep().very.o) === null || _fnDeep$very$o3 === void 0 ? void 0 : _fnDeep$very$o3.Foo) === null || _fnDeep$very$o$Foo3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fnDeep$very$o$Foo3, _m)._.call(_fnDeep$very$o$Foo3).toString(); + (_ref4 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref4 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref4, _m)._.call(_ref4); + (_ref5 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.self) === null || _ref5 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref5, _m)._.call(_ref5); + (_self5 = (_ref17 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref17 === void 0 ? void 0 : _ref17.self) === null || _self5 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self5, _m)._.call(_self5); + (_self6 = (_ref18 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.self) === null || _ref18 === void 0 ? void 0 : _ref18.self) === null || _self6 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self6, _m)._.call(_self6); + (_self$self2 = (_ref19 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref19 === void 0 || (_ref19 = _ref19.self) === null || _ref19 === void 0 ? void 0 : _ref19.self) === null || _self$self2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self$self2, _m)._.call(_self$self2); + (_ref6 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.getSelf()) === null || _ref6 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref6, _m)._.call(_ref6); + (_call2 = (_ref20 = fn === null || fn === void 0 ? void 0 : (_babelHelpers$assertC3 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._).getSelf) === null || _ref20 === void 0 ? void 0 : _ref20.call(_babelHelpers$assertC3)) === null || _call2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _call2, _m)._.call(_call2); + (_getSelf3 = (_ref21 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref21 === void 0 ? void 0 : _ref21.getSelf()) === null || _getSelf3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf3, _m)._.call(_getSelf3); + (_getSelf4 = (_ref22 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref22 === void 0 || (_ref22$getSelf = _ref22.getSelf) === null || _ref22$getSelf === void 0 ? void 0 : _ref22$getSelf.call(_ref22)) === null || _getSelf4 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf4, _m)._.call(_getSelf4); + (_self7 = (_ref23 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.getSelf()) === null || _ref23 === void 0 ? void 0 : _ref23.self) === null || _self7 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self7, _m)._.call(_self7); + (_call$self2 = (_ref24 = fn === null || fn === void 0 ? void 0 : (_babelHelpers$assertC4 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._).getSelf) === null || _ref24 === void 0 || (_ref24 = _ref24.call(_babelHelpers$assertC4)) === null || _ref24 === void 0 ? void 0 : _ref24.self) === null || _call$self2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _call$self2, _m)._.call(_call$self2); + (_getSelf$self3 = (_ref25 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref25 === void 0 || (_ref25 = _ref25.getSelf()) === null || _ref25 === void 0 ? void 0 : _ref25.self) === null || _getSelf$self3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf$self3, _m)._.call(_getSelf$self3); + (_getSelf$self4 = (_ref26 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref26 === void 0 || (_ref26$getSelf = _ref26.getSelf) === null || _ref26$getSelf === void 0 || (_ref26$getSelf = _ref26$getSelf.call(_ref26)) === null || _ref26$getSelf === void 0 ? void 0 : _ref26$getSelf.self) === null || _getSelf$self4 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf$self4, _m)._.call(_getSelf$self4); } } _Foo = Foo; @@ -69,7 +68,7 @@ var _x = { }; var _m = { _: function () { - return _assertClassBrand(_Foo, this, _x)._; + return babelHelpers.assertClassBrand(_Foo, this, _x)._; } }; var _self = { diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-optional-member-call/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-optional-member-call/output.js index de62754533daa1..5fd86160184351 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-optional-member-call/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-optional-member-call/output.js @@ -1,11 +1,10 @@ var _Foo; -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } class Foo { static getSelf() { return this; } static test() { - var _o$Foo, _o$Foo2, _o$Foo3, _deep$very$o, _deep$very$o$Foo, _deep$very$o2, _deep$very$o2$Foo, _deep$very$o3, _deep$very$o3$Foo, _assertClassBrand$_, _assertClassBrand$_$s, _ref, _ref$self, _ref2, _ref2$self, _self2, _self2$self, _assertClassBrand$_$g, _assertClassBrand$_2, _ref3, _ref3$call, _ref4, _ref4$getSelf, _getSelf, _ref5, _getSelf$call, _ref6, _ref6$self, _assertClassBrand$_3, _call, _call$self, _getSelf2, _getSelf2$self, _getSelf3, _getSelf3$self, _fn$Foo, _fn$Foo2, _fn$Foo3, _fnDeep$very$o, _fnDeep$very$o$Foo, _fnDeep$very$o2, _fnDeep$very$o2$Foo, _fnDeep$very$o3, _fnDeep$very$o3$Foo, _assertClassBrand$_4, _assertClassBrand$_$s2, _ref7, _ref7$self, _ref8, _ref8$self, _self3, _self3$self, _assertClassBrand$_$g2, _assertClassBrand$_5, _ref9, _ref9$call, _ref10, _ref10$getSelf, _getSelf4, _ref11, _getSelf4$call, _ref12, _ref12$self, _assertClassBrand$_6, _call2, _call2$self, _getSelf5, _getSelf5$self, _getSelf6, _getSelf6$self; + var _o$Foo, _o$Foo2, _o$Foo3, _deep$very$o, _deep$very$o$Foo, _deep$very$o2, _deep$very$o2$Foo, _deep$very$o3, _deep$very$o3$Foo, _babelHelpers$assertC, _babelHelpers$assertC2, _ref, _ref$self, _ref2, _ref2$self, _self2, _self2$self, _babelHelpers$assertC3, _babelHelpers$assertC4, _ref3, _ref3$call, _ref4, _ref4$getSelf, _getSelf, _ref5, _getSelf$call, _ref6, _ref6$self, _babelHelpers$assertC5, _call, _call$self, _getSelf2, _getSelf2$self, _getSelf3, _getSelf3$self, _fn$Foo, _fn$Foo2, _fn$Foo3, _fnDeep$very$o, _fnDeep$very$o$Foo, _fnDeep$very$o2, _fnDeep$very$o2$Foo, _fnDeep$very$o3, _fnDeep$very$o3$Foo, _babelHelpers$assertC6, _babelHelpers$assertC7, _ref7, _ref7$self, _ref8, _ref8$self, _self3, _self3$self, _babelHelpers$assertC8, _babelHelpers$assertC9, _ref9, _ref9$call, _ref10, _ref10$getSelf, _getSelf4, _ref11, _getSelf4$call, _ref12, _ref12$self, _babelHelpers$assertC10, _call2, _call2$self, _getSelf5, _getSelf5$self, _getSelf6, _getSelf6$self; const o = { Foo: Foo }; @@ -23,44 +22,44 @@ class Foo { Foo === null || Foo === void 0 ? void 0 : _m._.call(Foo); Foo === null || Foo === void 0 ? void 0 : _m._.call(Foo).toString; Foo === null || Foo === void 0 ? void 0 : _m._.call(Foo).toString(); - o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _o$Foo = o.Foo, _m)._.call(_o$Foo); - o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _o$Foo2 = o.Foo, _m)._.call(_o$Foo2).toString; - o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _o$Foo3 = o.Foo, _m)._.call(_o$Foo3).toString(); - (_deep$very$o = deep?.very.o) === null || _deep$very$o === void 0 ? void 0 : _assertClassBrand(Foo, _deep$very$o$Foo = _deep$very$o.Foo, _m)._.call(_deep$very$o$Foo); - (_deep$very$o2 = deep?.very.o) === null || _deep$very$o2 === void 0 ? void 0 : _assertClassBrand(Foo, _deep$very$o2$Foo = _deep$very$o2.Foo, _m)._.call(_deep$very$o2$Foo).toString; - (_deep$very$o3 = deep?.very.o) === null || _deep$very$o3 === void 0 ? void 0 : _assertClassBrand(Foo, _deep$very$o3$Foo = _deep$very$o3.Foo, _m)._.call(_deep$very$o3$Foo).toString(); - o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand$_ = _assertClassBrand(Foo, o.Foo, _self)._, _m)._.call(_assertClassBrand$_); - o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand$_$s = _assertClassBrand(Foo, o.Foo, _self)._.self, _m)._.call(_assertClassBrand$_$s); - (_ref = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref === void 0 ? void 0 : _assertClassBrand(Foo, _ref$self = _ref.self, _m)._.call(_ref$self); - (_ref2 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._.self) === null || _ref2 === void 0 ? void 0 : _assertClassBrand(Foo, _ref2$self = _ref2.self, _m)._.call(_ref2$self); - (_self2 = (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._)?.self) === null || _self2 === void 0 ? void 0 : _assertClassBrand(Foo, _self2$self = _self2.self, _m)._.call(_self2$self); - o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand$_$g = _assertClassBrand(Foo, o.Foo, _self)._.getSelf(), _m)._.call(_assertClassBrand$_$g); - (_ref3 = o === null || o === void 0 ? void 0 : (_assertClassBrand$_2 = _assertClassBrand(Foo, o.Foo, _self)._).getSelf) === null || _ref3 === void 0 ? void 0 : _assertClassBrand(Foo, _ref3$call = _ref3.call(_assertClassBrand$_2), _m)._.call(_ref3$call); - (_ref4 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref4 === void 0 ? void 0 : _assertClassBrand(Foo, _ref4$getSelf = _ref4.getSelf(), _m)._.call(_ref4$getSelf); - (_getSelf = (_ref5 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._)?.getSelf) === null || _getSelf === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf$call = _getSelf.call(_ref5), _m)._.call(_getSelf$call); - (_ref6 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._.getSelf()) === null || _ref6 === void 0 ? void 0 : _assertClassBrand(Foo, _ref6$self = _ref6.self, _m)._.call(_ref6$self); - (_call = (o === null || o === void 0 ? void 0 : (_assertClassBrand$_3 = _assertClassBrand(Foo, o.Foo, _self)._).getSelf)?.call(_assertClassBrand$_3)) === null || _call === void 0 ? void 0 : _assertClassBrand(Foo, _call$self = _call.self, _m)._.call(_call$self); - (_getSelf2 = (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._)?.getSelf()) === null || _getSelf2 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf2$self = _getSelf2.self, _m)._.call(_getSelf2$self); - (_getSelf3 = (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._)?.getSelf?.()) === null || _getSelf3 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf3$self = _getSelf3.self, _m)._.call(_getSelf3$self); - fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, _fn$Foo = fn().Foo, _m)._.call(_fn$Foo); - fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, _fn$Foo2 = fn().Foo, _m)._.call(_fn$Foo2).toString; - fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, _fn$Foo3 = fn().Foo, _m)._.call(_fn$Foo3).toString(); - (_fnDeep$very$o = fnDeep?.().very.o) === null || _fnDeep$very$o === void 0 ? void 0 : _assertClassBrand(Foo, _fnDeep$very$o$Foo = _fnDeep$very$o.Foo, _m)._.call(_fnDeep$very$o$Foo); - (_fnDeep$very$o2 = fnDeep?.().very.o) === null || _fnDeep$very$o2 === void 0 ? void 0 : _assertClassBrand(Foo, _fnDeep$very$o2$Foo = _fnDeep$very$o2.Foo, _m)._.call(_fnDeep$very$o2$Foo).toString; - (_fnDeep$very$o3 = fnDeep?.().very.o) === null || _fnDeep$very$o3 === void 0 ? void 0 : _assertClassBrand(Foo, _fnDeep$very$o3$Foo = _fnDeep$very$o3.Foo, _m)._.call(_fnDeep$very$o3$Foo).toString(); - fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand$_4 = _assertClassBrand(Foo, fn().Foo, _self)._, _m)._.call(_assertClassBrand$_4); - fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand$_$s2 = _assertClassBrand(Foo, fn().Foo, _self)._.self, _m)._.call(_assertClassBrand$_$s2); - (_ref7 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref7 === void 0 ? void 0 : _assertClassBrand(Foo, _ref7$self = _ref7.self, _m)._.call(_ref7$self); - (_ref8 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._.self) === null || _ref8 === void 0 ? void 0 : _assertClassBrand(Foo, _ref8$self = _ref8.self, _m)._.call(_ref8$self); - (_self3 = (fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._)?.self) === null || _self3 === void 0 ? void 0 : _assertClassBrand(Foo, _self3$self = _self3.self, _m)._.call(_self3$self); - fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, _assertClassBrand$_$g2 = _assertClassBrand(Foo, fn().Foo, _self)._.getSelf(), _m)._.call(_assertClassBrand$_$g2); - (_ref9 = fn === null || fn === void 0 ? void 0 : (_assertClassBrand$_5 = _assertClassBrand(Foo, fn().Foo, _self)._).getSelf) === null || _ref9 === void 0 ? void 0 : _assertClassBrand(Foo, _ref9$call = _ref9.call(_assertClassBrand$_5), _m)._.call(_ref9$call); - (_ref10 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref10 === void 0 ? void 0 : _assertClassBrand(Foo, _ref10$getSelf = _ref10.getSelf(), _m)._.call(_ref10$getSelf); - (_getSelf4 = (_ref11 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf) === null || _getSelf4 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf4$call = _getSelf4.call(_ref11), _m)._.call(_getSelf4$call); - (_ref12 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._.getSelf()) === null || _ref12 === void 0 ? void 0 : _assertClassBrand(Foo, _ref12$self = _ref12.self, _m)._.call(_ref12$self); - (_call2 = (fn === null || fn === void 0 ? void 0 : (_assertClassBrand$_6 = _assertClassBrand(Foo, fn().Foo, _self)._).getSelf)?.call(_assertClassBrand$_6)) === null || _call2 === void 0 ? void 0 : _assertClassBrand(Foo, _call2$self = _call2.self, _m)._.call(_call2$self); - (_getSelf5 = (fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf()) === null || _getSelf5 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf5$self = _getSelf5.self, _m)._.call(_getSelf5$self); - (_getSelf6 = (fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf?.()) === null || _getSelf6 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf6$self = _getSelf6.self, _m)._.call(_getSelf6$self); + o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _o$Foo = o.Foo, _m)._.call(_o$Foo); + o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _o$Foo2 = o.Foo, _m)._.call(_o$Foo2).toString; + o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _o$Foo3 = o.Foo, _m)._.call(_o$Foo3).toString(); + (_deep$very$o = deep?.very.o) === null || _deep$very$o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _deep$very$o$Foo = _deep$very$o.Foo, _m)._.call(_deep$very$o$Foo); + (_deep$very$o2 = deep?.very.o) === null || _deep$very$o2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _deep$very$o2$Foo = _deep$very$o2.Foo, _m)._.call(_deep$very$o2$Foo).toString; + (_deep$very$o3 = deep?.very.o) === null || _deep$very$o3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _deep$very$o3$Foo = _deep$very$o3.Foo, _m)._.call(_deep$very$o3$Foo).toString(); + o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _babelHelpers$assertC = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._, _m)._.call(_babelHelpers$assertC); + o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _babelHelpers$assertC2 = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.self, _m)._.call(_babelHelpers$assertC2); + (_ref = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref$self = _ref.self, _m)._.call(_ref$self); + (_ref2 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.self) === null || _ref2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref2$self = _ref2.self, _m)._.call(_ref2$self); + (_self2 = (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._)?.self) === null || _self2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self2$self = _self2.self, _m)._.call(_self2$self); + o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _babelHelpers$assertC3 = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.getSelf(), _m)._.call(_babelHelpers$assertC3); + (_ref3 = o === null || o === void 0 ? void 0 : (_babelHelpers$assertC4 = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._).getSelf) === null || _ref3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref3$call = _ref3.call(_babelHelpers$assertC4), _m)._.call(_ref3$call); + (_ref4 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref4 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref4$getSelf = _ref4.getSelf(), _m)._.call(_ref4$getSelf); + (_getSelf = (_ref5 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._)?.getSelf) === null || _getSelf === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf$call = _getSelf.call(_ref5), _m)._.call(_getSelf$call); + (_ref6 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.getSelf()) === null || _ref6 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref6$self = _ref6.self, _m)._.call(_ref6$self); + (_call = (o === null || o === void 0 ? void 0 : (_babelHelpers$assertC5 = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._).getSelf)?.call(_babelHelpers$assertC5)) === null || _call === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _call$self = _call.self, _m)._.call(_call$self); + (_getSelf2 = (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._)?.getSelf()) === null || _getSelf2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf2$self = _getSelf2.self, _m)._.call(_getSelf2$self); + (_getSelf3 = (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._)?.getSelf?.()) === null || _getSelf3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf3$self = _getSelf3.self, _m)._.call(_getSelf3$self); + fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fn$Foo = fn().Foo, _m)._.call(_fn$Foo); + fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fn$Foo2 = fn().Foo, _m)._.call(_fn$Foo2).toString; + fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fn$Foo3 = fn().Foo, _m)._.call(_fn$Foo3).toString(); + (_fnDeep$very$o = fnDeep?.().very.o) === null || _fnDeep$very$o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fnDeep$very$o$Foo = _fnDeep$very$o.Foo, _m)._.call(_fnDeep$very$o$Foo); + (_fnDeep$very$o2 = fnDeep?.().very.o) === null || _fnDeep$very$o2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fnDeep$very$o2$Foo = _fnDeep$very$o2.Foo, _m)._.call(_fnDeep$very$o2$Foo).toString; + (_fnDeep$very$o3 = fnDeep?.().very.o) === null || _fnDeep$very$o3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fnDeep$very$o3$Foo = _fnDeep$very$o3.Foo, _m)._.call(_fnDeep$very$o3$Foo).toString(); + fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _babelHelpers$assertC6 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._, _m)._.call(_babelHelpers$assertC6); + fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _babelHelpers$assertC7 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.self, _m)._.call(_babelHelpers$assertC7); + (_ref7 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref7 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref7$self = _ref7.self, _m)._.call(_ref7$self); + (_ref8 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.self) === null || _ref8 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref8$self = _ref8.self, _m)._.call(_ref8$self); + (_self3 = (fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._)?.self) === null || _self3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self3$self = _self3.self, _m)._.call(_self3$self); + fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _babelHelpers$assertC8 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.getSelf(), _m)._.call(_babelHelpers$assertC8); + (_ref9 = fn === null || fn === void 0 ? void 0 : (_babelHelpers$assertC9 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._).getSelf) === null || _ref9 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref9$call = _ref9.call(_babelHelpers$assertC9), _m)._.call(_ref9$call); + (_ref10 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref10 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref10$getSelf = _ref10.getSelf(), _m)._.call(_ref10$getSelf); + (_getSelf4 = (_ref11 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf) === null || _getSelf4 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf4$call = _getSelf4.call(_ref11), _m)._.call(_getSelf4$call); + (_ref12 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.getSelf()) === null || _ref12 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref12$self = _ref12.self, _m)._.call(_ref12$self); + (_call2 = (fn === null || fn === void 0 ? void 0 : (_babelHelpers$assertC10 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._).getSelf)?.call(_babelHelpers$assertC10)) === null || _call2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _call2$self = _call2.self, _m)._.call(_call2$self); + (_getSelf5 = (fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf()) === null || _getSelf5 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf5$self = _getSelf5.self, _m)._.call(_getSelf5$self); + (_getSelf6 = (fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf?.()) === null || _getSelf6 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf6$self = _getSelf6.self, _m)._.call(_getSelf6$self); } } _Foo = Foo; @@ -69,7 +68,7 @@ var _x = { }; var _m = { _: function () { - return _assertClassBrand(_Foo, this, _x)._; + return babelHelpers.assertClassBrand(_Foo, this, _x)._; } }; var _self = { diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-optional-property-with-transform/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-optional-property-with-transform/output.js index 02ecc395503139..3a391cb18b2c93 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-optional-property-with-transform/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-optional-property-with-transform/output.js @@ -1,11 +1,10 @@ var _Foo; -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } class Foo { static getSelf() { return this; } static test() { - var _o$Foo, _o$Foo2, _o$Foo3, _deep$very$o$Foo, _deep$very$o$Foo2, _deep$very$o$Foo3, _ref, _ref2, _self2, _self3, _self$self, _ref3, _assertClassBrand$_, _call, _getSelf, _getSelf2, _self4, _assertClassBrand$_2, _call$self, _getSelf$self, _getSelf$self2, _fn$Foo, _fn$Foo2, _fn$Foo3, _fnDeep$very$o$Foo, _fnDeep$very$o$Foo2, _fnDeep$very$o$Foo3, _ref4, _ref5, _self5, _self6, _self$self2, _ref6, _assertClassBrand$_3, _call2, _getSelf3, _getSelf4, _self7, _assertClassBrand$_4, _call$self2, _getSelf$self3, _getSelf$self4, _deep$very$o, _deep$very$o2, _deep$very$o3, _ref7, _ref8, _ref9, _ref10, _ref11, _ref12, _ref12$getSelf, _ref13, _ref14, _ref15, _ref16, _ref16$getSelf, _fnDeep$very$o, _fnDeep$very$o2, _fnDeep$very$o3, _ref17, _ref18, _ref19, _ref20, _ref21, _ref22, _ref22$getSelf, _ref23, _ref24, _ref25, _ref26, _ref26$getSelf; + var _o$Foo, _o$Foo2, _o$Foo3, _deep$very$o$Foo, _deep$very$o$Foo2, _deep$very$o$Foo3, _ref, _ref2, _self2, _self3, _self$self, _ref3, _babelHelpers$assertC, _call, _getSelf, _getSelf2, _self4, _babelHelpers$assertC2, _call$self, _getSelf$self, _getSelf$self2, _fn$Foo, _fn$Foo2, _fn$Foo3, _fnDeep$very$o$Foo, _fnDeep$very$o$Foo2, _fnDeep$very$o$Foo3, _ref4, _ref5, _self5, _self6, _self$self2, _ref6, _babelHelpers$assertC3, _call2, _getSelf3, _getSelf4, _self7, _babelHelpers$assertC4, _call$self2, _getSelf$self3, _getSelf$self4, _deep$very$o, _deep$very$o2, _deep$very$o3, _ref7, _ref8, _ref9, _ref10, _ref11, _ref12, _ref12$getSelf, _ref13, _ref14, _ref15, _ref16, _ref16$getSelf, _fnDeep$very$o, _fnDeep$very$o2, _fnDeep$very$o3, _ref17, _ref18, _ref19, _ref20, _ref21, _ref22, _ref22$getSelf, _ref23, _ref24, _ref25, _ref26, _ref26$getSelf; const o = { Foo: Foo }; @@ -23,44 +22,44 @@ class Foo { Foo === null || Foo === void 0 ? void 0 : _x._; Foo === null || Foo === void 0 ? void 0 : _x._.toString; Foo === null || Foo === void 0 ? void 0 : _x._.toString(); - (_o$Foo = o === null || o === void 0 ? void 0 : o.Foo) === null || _o$Foo === void 0 ? void 0 : _assertClassBrand(Foo, _o$Foo, _x)._; - (_o$Foo2 = o === null || o === void 0 ? void 0 : o.Foo) === null || _o$Foo2 === void 0 ? void 0 : _assertClassBrand(Foo, _o$Foo2, _x)._.toString; - (_o$Foo3 = o === null || o === void 0 ? void 0 : o.Foo) === null || _o$Foo3 === void 0 ? void 0 : _assertClassBrand(Foo, _o$Foo3, _x)._.toString(); - (_deep$very$o$Foo = deep === null || deep === void 0 || (_deep$very$o = deep.very.o) === null || _deep$very$o === void 0 ? void 0 : _deep$very$o.Foo) === null || _deep$very$o$Foo === void 0 ? void 0 : _assertClassBrand(Foo, _deep$very$o$Foo, _x)._; - (_deep$very$o$Foo2 = deep === null || deep === void 0 || (_deep$very$o2 = deep.very.o) === null || _deep$very$o2 === void 0 ? void 0 : _deep$very$o2.Foo) === null || _deep$very$o$Foo2 === void 0 ? void 0 : _assertClassBrand(Foo, _deep$very$o$Foo2, _x)._.toString; - (_deep$very$o$Foo3 = deep === null || deep === void 0 || (_deep$very$o3 = deep.very.o) === null || _deep$very$o3 === void 0 ? void 0 : _deep$very$o3.Foo) === null || _deep$very$o$Foo3 === void 0 ? void 0 : _assertClassBrand(Foo, _deep$very$o$Foo3, _x)._.toString(); - (_ref = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref === void 0 ? void 0 : _assertClassBrand(Foo, _ref, _x)._; - (_ref2 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._.self) === null || _ref2 === void 0 ? void 0 : _assertClassBrand(Foo, _ref2, _x)._; - (_self2 = (_ref7 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref7 === void 0 ? void 0 : _ref7.self) === null || _self2 === void 0 ? void 0 : _assertClassBrand(Foo, _self2, _x)._; - (_self3 = (_ref8 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._.self) === null || _ref8 === void 0 ? void 0 : _ref8.self) === null || _self3 === void 0 ? void 0 : _assertClassBrand(Foo, _self3, _x)._; - (_self$self = (_ref9 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref9 === void 0 || (_ref9 = _ref9.self) === null || _ref9 === void 0 ? void 0 : _ref9.self) === null || _self$self === void 0 ? void 0 : _assertClassBrand(Foo, _self$self, _x)._; - (_ref3 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._.getSelf()) === null || _ref3 === void 0 ? void 0 : _assertClassBrand(Foo, _ref3, _x)._; - (_call = (_ref10 = o === null || o === void 0 ? void 0 : (_assertClassBrand$_ = _assertClassBrand(Foo, o.Foo, _self)._).getSelf) === null || _ref10 === void 0 ? void 0 : _ref10.call(_assertClassBrand$_)) === null || _call === void 0 ? void 0 : _assertClassBrand(Foo, _call, _x)._; - (_getSelf = (_ref11 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref11 === void 0 ? void 0 : _ref11.getSelf()) === null || _getSelf === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf, _x)._; - (_getSelf2 = (_ref12 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref12 === void 0 || (_ref12$getSelf = _ref12.getSelf) === null || _ref12$getSelf === void 0 ? void 0 : _ref12$getSelf.call(_ref12)) === null || _getSelf2 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf2, _x)._; - (_self4 = (_ref13 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._.getSelf()) === null || _ref13 === void 0 ? void 0 : _ref13.self) === null || _self4 === void 0 ? void 0 : _assertClassBrand(Foo, _self4, _x)._; - (_call$self = (_ref14 = o === null || o === void 0 ? void 0 : (_assertClassBrand$_2 = _assertClassBrand(Foo, o.Foo, _self)._).getSelf) === null || _ref14 === void 0 || (_ref14 = _ref14.call(_assertClassBrand$_2)) === null || _ref14 === void 0 ? void 0 : _ref14.self) === null || _call$self === void 0 ? void 0 : _assertClassBrand(Foo, _call$self, _x)._; - (_getSelf$self = (_ref15 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref15 === void 0 || (_ref15 = _ref15.getSelf()) === null || _ref15 === void 0 ? void 0 : _ref15.self) === null || _getSelf$self === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf$self, _x)._; - (_getSelf$self2 = (_ref16 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref16 === void 0 || (_ref16$getSelf = _ref16.getSelf) === null || _ref16$getSelf === void 0 || (_ref16$getSelf = _ref16$getSelf.call(_ref16)) === null || _ref16$getSelf === void 0 ? void 0 : _ref16$getSelf.self) === null || _getSelf$self2 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf$self2, _x)._; - (_fn$Foo = fn === null || fn === void 0 ? void 0 : fn().Foo) === null || _fn$Foo === void 0 ? void 0 : _assertClassBrand(Foo, _fn$Foo, _x)._; - (_fn$Foo2 = fn === null || fn === void 0 ? void 0 : fn().Foo) === null || _fn$Foo2 === void 0 ? void 0 : _assertClassBrand(Foo, _fn$Foo2, _x)._.toString; - (_fn$Foo3 = fn === null || fn === void 0 ? void 0 : fn().Foo) === null || _fn$Foo3 === void 0 ? void 0 : _assertClassBrand(Foo, _fn$Foo3, _x)._.toString(); - (_fnDeep$very$o$Foo = fnDeep === null || fnDeep === void 0 || (_fnDeep$very$o = fnDeep().very.o) === null || _fnDeep$very$o === void 0 ? void 0 : _fnDeep$very$o.Foo) === null || _fnDeep$very$o$Foo === void 0 ? void 0 : _assertClassBrand(Foo, _fnDeep$very$o$Foo, _x)._; - (_fnDeep$very$o$Foo2 = fnDeep === null || fnDeep === void 0 || (_fnDeep$very$o2 = fnDeep().very.o) === null || _fnDeep$very$o2 === void 0 ? void 0 : _fnDeep$very$o2.Foo) === null || _fnDeep$very$o$Foo2 === void 0 ? void 0 : _assertClassBrand(Foo, _fnDeep$very$o$Foo2, _x)._.toString; - (_fnDeep$very$o$Foo3 = fnDeep === null || fnDeep === void 0 || (_fnDeep$very$o3 = fnDeep().very.o) === null || _fnDeep$very$o3 === void 0 ? void 0 : _fnDeep$very$o3.Foo) === null || _fnDeep$very$o$Foo3 === void 0 ? void 0 : _assertClassBrand(Foo, _fnDeep$very$o$Foo3, _x)._.toString(); - (_ref4 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref4 === void 0 ? void 0 : _assertClassBrand(Foo, _ref4, _x)._; - (_ref5 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._.self) === null || _ref5 === void 0 ? void 0 : _assertClassBrand(Foo, _ref5, _x)._; - (_self5 = (_ref17 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref17 === void 0 ? void 0 : _ref17.self) === null || _self5 === void 0 ? void 0 : _assertClassBrand(Foo, _self5, _x)._; - (_self6 = (_ref18 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._.self) === null || _ref18 === void 0 ? void 0 : _ref18.self) === null || _self6 === void 0 ? void 0 : _assertClassBrand(Foo, _self6, _x)._; - (_self$self2 = (_ref19 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref19 === void 0 || (_ref19 = _ref19.self) === null || _ref19 === void 0 ? void 0 : _ref19.self) === null || _self$self2 === void 0 ? void 0 : _assertClassBrand(Foo, _self$self2, _x)._; - (_ref6 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._.getSelf()) === null || _ref6 === void 0 ? void 0 : _assertClassBrand(Foo, _ref6, _x)._; - (_call2 = (_ref20 = fn === null || fn === void 0 ? void 0 : (_assertClassBrand$_3 = _assertClassBrand(Foo, fn().Foo, _self)._).getSelf) === null || _ref20 === void 0 ? void 0 : _ref20.call(_assertClassBrand$_3)) === null || _call2 === void 0 ? void 0 : _assertClassBrand(Foo, _call2, _x)._; - (_getSelf3 = (_ref21 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref21 === void 0 ? void 0 : _ref21.getSelf()) === null || _getSelf3 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf3, _x)._; - (_getSelf4 = (_ref22 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref22 === void 0 || (_ref22$getSelf = _ref22.getSelf) === null || _ref22$getSelf === void 0 ? void 0 : _ref22$getSelf.call(_ref22)) === null || _getSelf4 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf4, _x)._; - (_self7 = (_ref23 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._.getSelf()) === null || _ref23 === void 0 ? void 0 : _ref23.self) === null || _self7 === void 0 ? void 0 : _assertClassBrand(Foo, _self7, _x)._; - (_call$self2 = (_ref24 = fn === null || fn === void 0 ? void 0 : (_assertClassBrand$_4 = _assertClassBrand(Foo, fn().Foo, _self)._).getSelf) === null || _ref24 === void 0 || (_ref24 = _ref24.call(_assertClassBrand$_4)) === null || _ref24 === void 0 ? void 0 : _ref24.self) === null || _call$self2 === void 0 ? void 0 : _assertClassBrand(Foo, _call$self2, _x)._; - (_getSelf$self3 = (_ref25 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref25 === void 0 || (_ref25 = _ref25.getSelf()) === null || _ref25 === void 0 ? void 0 : _ref25.self) === null || _getSelf$self3 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf$self3, _x)._; - (_getSelf$self4 = (_ref26 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref26 === void 0 || (_ref26$getSelf = _ref26.getSelf) === null || _ref26$getSelf === void 0 || (_ref26$getSelf = _ref26$getSelf.call(_ref26)) === null || _ref26$getSelf === void 0 ? void 0 : _ref26$getSelf.self) === null || _getSelf$self4 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf$self4, _x)._; + (_o$Foo = o === null || o === void 0 ? void 0 : o.Foo) === null || _o$Foo === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _o$Foo, _x)._; + (_o$Foo2 = o === null || o === void 0 ? void 0 : o.Foo) === null || _o$Foo2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _o$Foo2, _x)._.toString; + (_o$Foo3 = o === null || o === void 0 ? void 0 : o.Foo) === null || _o$Foo3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _o$Foo3, _x)._.toString(); + (_deep$very$o$Foo = deep === null || deep === void 0 || (_deep$very$o = deep.very.o) === null || _deep$very$o === void 0 ? void 0 : _deep$very$o.Foo) === null || _deep$very$o$Foo === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _deep$very$o$Foo, _x)._; + (_deep$very$o$Foo2 = deep === null || deep === void 0 || (_deep$very$o2 = deep.very.o) === null || _deep$very$o2 === void 0 ? void 0 : _deep$very$o2.Foo) === null || _deep$very$o$Foo2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _deep$very$o$Foo2, _x)._.toString; + (_deep$very$o$Foo3 = deep === null || deep === void 0 || (_deep$very$o3 = deep.very.o) === null || _deep$very$o3 === void 0 ? void 0 : _deep$very$o3.Foo) === null || _deep$very$o$Foo3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _deep$very$o$Foo3, _x)._.toString(); + (_ref = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref, _x)._; + (_ref2 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.self) === null || _ref2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref2, _x)._; + (_self2 = (_ref7 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref7 === void 0 ? void 0 : _ref7.self) === null || _self2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self2, _x)._; + (_self3 = (_ref8 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.self) === null || _ref8 === void 0 ? void 0 : _ref8.self) === null || _self3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self3, _x)._; + (_self$self = (_ref9 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref9 === void 0 || (_ref9 = _ref9.self) === null || _ref9 === void 0 ? void 0 : _ref9.self) === null || _self$self === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self$self, _x)._; + (_ref3 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.getSelf()) === null || _ref3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref3, _x)._; + (_call = (_ref10 = o === null || o === void 0 ? void 0 : (_babelHelpers$assertC = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._).getSelf) === null || _ref10 === void 0 ? void 0 : _ref10.call(_babelHelpers$assertC)) === null || _call === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _call, _x)._; + (_getSelf = (_ref11 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref11 === void 0 ? void 0 : _ref11.getSelf()) === null || _getSelf === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf, _x)._; + (_getSelf2 = (_ref12 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref12 === void 0 || (_ref12$getSelf = _ref12.getSelf) === null || _ref12$getSelf === void 0 ? void 0 : _ref12$getSelf.call(_ref12)) === null || _getSelf2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf2, _x)._; + (_self4 = (_ref13 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.getSelf()) === null || _ref13 === void 0 ? void 0 : _ref13.self) === null || _self4 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self4, _x)._; + (_call$self = (_ref14 = o === null || o === void 0 ? void 0 : (_babelHelpers$assertC2 = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._).getSelf) === null || _ref14 === void 0 || (_ref14 = _ref14.call(_babelHelpers$assertC2)) === null || _ref14 === void 0 ? void 0 : _ref14.self) === null || _call$self === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _call$self, _x)._; + (_getSelf$self = (_ref15 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref15 === void 0 || (_ref15 = _ref15.getSelf()) === null || _ref15 === void 0 ? void 0 : _ref15.self) === null || _getSelf$self === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf$self, _x)._; + (_getSelf$self2 = (_ref16 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref16 === void 0 || (_ref16$getSelf = _ref16.getSelf) === null || _ref16$getSelf === void 0 || (_ref16$getSelf = _ref16$getSelf.call(_ref16)) === null || _ref16$getSelf === void 0 ? void 0 : _ref16$getSelf.self) === null || _getSelf$self2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf$self2, _x)._; + (_fn$Foo = fn === null || fn === void 0 ? void 0 : fn().Foo) === null || _fn$Foo === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fn$Foo, _x)._; + (_fn$Foo2 = fn === null || fn === void 0 ? void 0 : fn().Foo) === null || _fn$Foo2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fn$Foo2, _x)._.toString; + (_fn$Foo3 = fn === null || fn === void 0 ? void 0 : fn().Foo) === null || _fn$Foo3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fn$Foo3, _x)._.toString(); + (_fnDeep$very$o$Foo = fnDeep === null || fnDeep === void 0 || (_fnDeep$very$o = fnDeep().very.o) === null || _fnDeep$very$o === void 0 ? void 0 : _fnDeep$very$o.Foo) === null || _fnDeep$very$o$Foo === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fnDeep$very$o$Foo, _x)._; + (_fnDeep$very$o$Foo2 = fnDeep === null || fnDeep === void 0 || (_fnDeep$very$o2 = fnDeep().very.o) === null || _fnDeep$very$o2 === void 0 ? void 0 : _fnDeep$very$o2.Foo) === null || _fnDeep$very$o$Foo2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fnDeep$very$o$Foo2, _x)._.toString; + (_fnDeep$very$o$Foo3 = fnDeep === null || fnDeep === void 0 || (_fnDeep$very$o3 = fnDeep().very.o) === null || _fnDeep$very$o3 === void 0 ? void 0 : _fnDeep$very$o3.Foo) === null || _fnDeep$very$o$Foo3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fnDeep$very$o$Foo3, _x)._.toString(); + (_ref4 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref4 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref4, _x)._; + (_ref5 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.self) === null || _ref5 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref5, _x)._; + (_self5 = (_ref17 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref17 === void 0 ? void 0 : _ref17.self) === null || _self5 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self5, _x)._; + (_self6 = (_ref18 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.self) === null || _ref18 === void 0 ? void 0 : _ref18.self) === null || _self6 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self6, _x)._; + (_self$self2 = (_ref19 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref19 === void 0 || (_ref19 = _ref19.self) === null || _ref19 === void 0 ? void 0 : _ref19.self) === null || _self$self2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self$self2, _x)._; + (_ref6 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.getSelf()) === null || _ref6 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref6, _x)._; + (_call2 = (_ref20 = fn === null || fn === void 0 ? void 0 : (_babelHelpers$assertC3 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._).getSelf) === null || _ref20 === void 0 ? void 0 : _ref20.call(_babelHelpers$assertC3)) === null || _call2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _call2, _x)._; + (_getSelf3 = (_ref21 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref21 === void 0 ? void 0 : _ref21.getSelf()) === null || _getSelf3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf3, _x)._; + (_getSelf4 = (_ref22 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref22 === void 0 || (_ref22$getSelf = _ref22.getSelf) === null || _ref22$getSelf === void 0 ? void 0 : _ref22$getSelf.call(_ref22)) === null || _getSelf4 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf4, _x)._; + (_self7 = (_ref23 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.getSelf()) === null || _ref23 === void 0 ? void 0 : _ref23.self) === null || _self7 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self7, _x)._; + (_call$self2 = (_ref24 = fn === null || fn === void 0 ? void 0 : (_babelHelpers$assertC4 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._).getSelf) === null || _ref24 === void 0 || (_ref24 = _ref24.call(_babelHelpers$assertC4)) === null || _ref24 === void 0 ? void 0 : _ref24.self) === null || _call$self2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _call$self2, _x)._; + (_getSelf$self3 = (_ref25 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref25 === void 0 || (_ref25 = _ref25.getSelf()) === null || _ref25 === void 0 ? void 0 : _ref25.self) === null || _getSelf$self3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf$self3, _x)._; + (_getSelf$self4 = (_ref26 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref26 === void 0 || (_ref26$getSelf = _ref26.getSelf) === null || _ref26$getSelf === void 0 || (_ref26$getSelf = _ref26$getSelf.call(_ref26)) === null || _ref26$getSelf === void 0 ? void 0 : _ref26$getSelf.self) === null || _getSelf$self4 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf$self4, _x)._; } } _Foo = Foo; diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-optional-property/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-optional-property/output.js index 8065ece61eb6db..53b644fd38f859 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-optional-property/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/optional-chain-optional-property/output.js @@ -1,11 +1,10 @@ var _Foo; -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } class Foo { static getSelf() { return this; } static test() { - var _o$Foo, _o$Foo2, _o$Foo3, _deep$very$o$Foo, _deep$very$o$Foo2, _deep$very$o$Foo3, _ref, _ref2, _self2, _self3, _self$self, _ref3, _assertClassBrand$_, _call, _getSelf, _getSelf2, _self4, _assertClassBrand$_2, _call$self, _getSelf$self, _getSelf$self2, _fn$Foo, _fn$Foo2, _fn$Foo3, _fnDeep$very$o$Foo, _fnDeep$very$o$Foo2, _fnDeep$very$o$Foo3, _ref4, _ref5, _self5, _self6, _self$self2, _ref6, _assertClassBrand$_3, _call2, _getSelf3, _getSelf4, _self7, _assertClassBrand$_4, _call$self2, _getSelf$self3, _getSelf$self4; + var _o$Foo, _o$Foo2, _o$Foo3, _deep$very$o$Foo, _deep$very$o$Foo2, _deep$very$o$Foo3, _ref, _ref2, _self2, _self3, _self$self, _ref3, _babelHelpers$assertC, _call, _getSelf, _getSelf2, _self4, _babelHelpers$assertC2, _call$self, _getSelf$self, _getSelf$self2, _fn$Foo, _fn$Foo2, _fn$Foo3, _fnDeep$very$o$Foo, _fnDeep$very$o$Foo2, _fnDeep$very$o$Foo3, _ref4, _ref5, _self5, _self6, _self$self2, _ref6, _babelHelpers$assertC3, _call2, _getSelf3, _getSelf4, _self7, _babelHelpers$assertC4, _call$self2, _getSelf$self3, _getSelf$self4; const o = { Foo: Foo }; @@ -23,44 +22,44 @@ class Foo { Foo === null || Foo === void 0 ? void 0 : _x._; Foo === null || Foo === void 0 ? void 0 : _x._.toString; Foo === null || Foo === void 0 ? void 0 : _x._.toString(); - (_o$Foo = o?.Foo) === null || _o$Foo === void 0 ? void 0 : _assertClassBrand(Foo, _o$Foo, _x)._; - (_o$Foo2 = o?.Foo) === null || _o$Foo2 === void 0 ? void 0 : _assertClassBrand(Foo, _o$Foo2, _x)._.toString; - (_o$Foo3 = o?.Foo) === null || _o$Foo3 === void 0 ? void 0 : _assertClassBrand(Foo, _o$Foo3, _x)._.toString(); - (_deep$very$o$Foo = deep?.very.o?.Foo) === null || _deep$very$o$Foo === void 0 ? void 0 : _assertClassBrand(Foo, _deep$very$o$Foo, _x)._; - (_deep$very$o$Foo2 = deep?.very.o?.Foo) === null || _deep$very$o$Foo2 === void 0 ? void 0 : _assertClassBrand(Foo, _deep$very$o$Foo2, _x)._.toString; - (_deep$very$o$Foo3 = deep?.very.o?.Foo) === null || _deep$very$o$Foo3 === void 0 ? void 0 : _assertClassBrand(Foo, _deep$very$o$Foo3, _x)._.toString(); - (_ref = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._) === null || _ref === void 0 ? void 0 : _assertClassBrand(Foo, _ref, _x)._; - (_ref2 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._.self) === null || _ref2 === void 0 ? void 0 : _assertClassBrand(Foo, _ref2, _x)._; - (_self2 = (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._)?.self) === null || _self2 === void 0 ? void 0 : _assertClassBrand(Foo, _self2, _x)._; - (_self3 = (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._.self)?.self) === null || _self3 === void 0 ? void 0 : _assertClassBrand(Foo, _self3, _x)._; - (_self$self = (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._)?.self?.self) === null || _self$self === void 0 ? void 0 : _assertClassBrand(Foo, _self$self, _x)._; - (_ref3 = o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._.getSelf()) === null || _ref3 === void 0 ? void 0 : _assertClassBrand(Foo, _ref3, _x)._; - (_call = (o === null || o === void 0 ? void 0 : (_assertClassBrand$_ = _assertClassBrand(Foo, o.Foo, _self)._).getSelf)?.call(_assertClassBrand$_)) === null || _call === void 0 ? void 0 : _assertClassBrand(Foo, _call, _x)._; - (_getSelf = (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._)?.getSelf()) === null || _getSelf === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf, _x)._; - (_getSelf2 = (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._)?.getSelf?.()) === null || _getSelf2 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf2, _x)._; - (_self4 = (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._.getSelf())?.self) === null || _self4 === void 0 ? void 0 : _assertClassBrand(Foo, _self4, _x)._; - (_call$self = (o === null || o === void 0 ? void 0 : (_assertClassBrand$_2 = _assertClassBrand(Foo, o.Foo, _self)._).getSelf)?.call(_assertClassBrand$_2)?.self) === null || _call$self === void 0 ? void 0 : _assertClassBrand(Foo, _call$self, _x)._; - (_getSelf$self = (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._)?.getSelf()?.self) === null || _getSelf$self === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf$self, _x)._; - (_getSelf$self2 = (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, o.Foo, _self)._)?.getSelf?.()?.self) === null || _getSelf$self2 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf$self2, _x)._; - (_fn$Foo = fn?.().Foo) === null || _fn$Foo === void 0 ? void 0 : _assertClassBrand(Foo, _fn$Foo, _x)._; - (_fn$Foo2 = fn?.().Foo) === null || _fn$Foo2 === void 0 ? void 0 : _assertClassBrand(Foo, _fn$Foo2, _x)._.toString; - (_fn$Foo3 = fn?.().Foo) === null || _fn$Foo3 === void 0 ? void 0 : _assertClassBrand(Foo, _fn$Foo3, _x)._.toString(); - (_fnDeep$very$o$Foo = fnDeep?.().very.o?.Foo) === null || _fnDeep$very$o$Foo === void 0 ? void 0 : _assertClassBrand(Foo, _fnDeep$very$o$Foo, _x)._; - (_fnDeep$very$o$Foo2 = fnDeep?.().very.o?.Foo) === null || _fnDeep$very$o$Foo2 === void 0 ? void 0 : _assertClassBrand(Foo, _fnDeep$very$o$Foo2, _x)._.toString; - (_fnDeep$very$o$Foo3 = fnDeep?.().very.o?.Foo) === null || _fnDeep$very$o$Foo3 === void 0 ? void 0 : _assertClassBrand(Foo, _fnDeep$very$o$Foo3, _x)._.toString(); - (_ref4 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref4 === void 0 ? void 0 : _assertClassBrand(Foo, _ref4, _x)._; - (_ref5 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._.self) === null || _ref5 === void 0 ? void 0 : _assertClassBrand(Foo, _ref5, _x)._; - (_self5 = (fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._)?.self) === null || _self5 === void 0 ? void 0 : _assertClassBrand(Foo, _self5, _x)._; - (_self6 = (fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._.self)?.self) === null || _self6 === void 0 ? void 0 : _assertClassBrand(Foo, _self6, _x)._; - (_self$self2 = (fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._)?.self?.self) === null || _self$self2 === void 0 ? void 0 : _assertClassBrand(Foo, _self$self2, _x)._; - (_ref6 = fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._.getSelf()) === null || _ref6 === void 0 ? void 0 : _assertClassBrand(Foo, _ref6, _x)._; - (_call2 = (fn === null || fn === void 0 ? void 0 : (_assertClassBrand$_3 = _assertClassBrand(Foo, fn().Foo, _self)._).getSelf)?.call(_assertClassBrand$_3)) === null || _call2 === void 0 ? void 0 : _assertClassBrand(Foo, _call2, _x)._; - (_getSelf3 = (fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf()) === null || _getSelf3 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf3, _x)._; - (_getSelf4 = (fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf?.()) === null || _getSelf4 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf4, _x)._; - (_self7 = (fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._.getSelf())?.self) === null || _self7 === void 0 ? void 0 : _assertClassBrand(Foo, _self7, _x)._; - (_call$self2 = (fn === null || fn === void 0 ? void 0 : (_assertClassBrand$_4 = _assertClassBrand(Foo, fn().Foo, _self)._).getSelf)?.call(_assertClassBrand$_4)?.self) === null || _call$self2 === void 0 ? void 0 : _assertClassBrand(Foo, _call$self2, _x)._; - (_getSelf$self3 = (fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf()?.self) === null || _getSelf$self3 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf$self3, _x)._; - (_getSelf$self4 = (fn === null || fn === void 0 ? void 0 : _assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf?.()?.self) === null || _getSelf$self4 === void 0 ? void 0 : _assertClassBrand(Foo, _getSelf$self4, _x)._; + (_o$Foo = o?.Foo) === null || _o$Foo === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _o$Foo, _x)._; + (_o$Foo2 = o?.Foo) === null || _o$Foo2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _o$Foo2, _x)._.toString; + (_o$Foo3 = o?.Foo) === null || _o$Foo3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _o$Foo3, _x)._.toString(); + (_deep$very$o$Foo = deep?.very.o?.Foo) === null || _deep$very$o$Foo === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _deep$very$o$Foo, _x)._; + (_deep$very$o$Foo2 = deep?.very.o?.Foo) === null || _deep$very$o$Foo2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _deep$very$o$Foo2, _x)._.toString; + (_deep$very$o$Foo3 = deep?.very.o?.Foo) === null || _deep$very$o$Foo3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _deep$very$o$Foo3, _x)._.toString(); + (_ref = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._) === null || _ref === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref, _x)._; + (_ref2 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.self) === null || _ref2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref2, _x)._; + (_self2 = (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._)?.self) === null || _self2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self2, _x)._; + (_self3 = (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.self)?.self) === null || _self3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self3, _x)._; + (_self$self = (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._)?.self?.self) === null || _self$self === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self$self, _x)._; + (_ref3 = o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.getSelf()) === null || _ref3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref3, _x)._; + (_call = (o === null || o === void 0 ? void 0 : (_babelHelpers$assertC = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._).getSelf)?.call(_babelHelpers$assertC)) === null || _call === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _call, _x)._; + (_getSelf = (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._)?.getSelf()) === null || _getSelf === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf, _x)._; + (_getSelf2 = (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._)?.getSelf?.()) === null || _getSelf2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf2, _x)._; + (_self4 = (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._.getSelf())?.self) === null || _self4 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self4, _x)._; + (_call$self = (o === null || o === void 0 ? void 0 : (_babelHelpers$assertC2 = babelHelpers.assertClassBrand(Foo, o.Foo, _self)._).getSelf)?.call(_babelHelpers$assertC2)?.self) === null || _call$self === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _call$self, _x)._; + (_getSelf$self = (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._)?.getSelf()?.self) === null || _getSelf$self === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf$self, _x)._; + (_getSelf$self2 = (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, o.Foo, _self)._)?.getSelf?.()?.self) === null || _getSelf$self2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf$self2, _x)._; + (_fn$Foo = fn?.().Foo) === null || _fn$Foo === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fn$Foo, _x)._; + (_fn$Foo2 = fn?.().Foo) === null || _fn$Foo2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fn$Foo2, _x)._.toString; + (_fn$Foo3 = fn?.().Foo) === null || _fn$Foo3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fn$Foo3, _x)._.toString(); + (_fnDeep$very$o$Foo = fnDeep?.().very.o?.Foo) === null || _fnDeep$very$o$Foo === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fnDeep$very$o$Foo, _x)._; + (_fnDeep$very$o$Foo2 = fnDeep?.().very.o?.Foo) === null || _fnDeep$very$o$Foo2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fnDeep$very$o$Foo2, _x)._.toString; + (_fnDeep$very$o$Foo3 = fnDeep?.().very.o?.Foo) === null || _fnDeep$very$o$Foo3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fnDeep$very$o$Foo3, _x)._.toString(); + (_ref4 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._) === null || _ref4 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref4, _x)._; + (_ref5 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.self) === null || _ref5 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref5, _x)._; + (_self5 = (fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._)?.self) === null || _self5 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self5, _x)._; + (_self6 = (fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.self)?.self) === null || _self6 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self6, _x)._; + (_self$self2 = (fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._)?.self?.self) === null || _self$self2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self$self2, _x)._; + (_ref6 = fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.getSelf()) === null || _ref6 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _ref6, _x)._; + (_call2 = (fn === null || fn === void 0 ? void 0 : (_babelHelpers$assertC3 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._).getSelf)?.call(_babelHelpers$assertC3)) === null || _call2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _call2, _x)._; + (_getSelf3 = (fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf()) === null || _getSelf3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf3, _x)._; + (_getSelf4 = (fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf?.()) === null || _getSelf4 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf4, _x)._; + (_self7 = (fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._.getSelf())?.self) === null || _self7 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _self7, _x)._; + (_call$self2 = (fn === null || fn === void 0 ? void 0 : (_babelHelpers$assertC4 = babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._).getSelf)?.call(_babelHelpers$assertC4)?.self) === null || _call$self2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _call$self2, _x)._; + (_getSelf$self3 = (fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf()?.self) === null || _getSelf$self3 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf$self3, _x)._; + (_getSelf$self4 = (fn === null || fn === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, fn().Foo, _self)._)?.getSelf?.()?.self) === null || _getSelf$self4 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _getSelf$self4, _x)._; } } _Foo = Foo; diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/parenthesized-optional-member-call-with-transform/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/parenthesized-optional-member-call-with-transform/output.js index 1c0c856d3726f3..fa422b35ed7678 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/parenthesized-optional-member-call-with-transform/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/parenthesized-optional-member-call-with-transform/output.js @@ -1,5 +1,4 @@ var _Foo; -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } class Foo { static getSelf() { return Foo; @@ -15,13 +14,13 @@ class Foo { (Foo === null || Foo === void 0 ? void 0 : _m._.bind(Foo))(); (Foo === null || Foo === void 0 ? void 0 : _m._.bind(Foo))().toString; (Foo === null || Foo === void 0 ? void 0 : _m._.bind(Foo))().toString(); - (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _o$Foo = o.Foo, _m)._.bind(_o$Foo))(); - (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _o$Foo2 = o.Foo, _m)._.bind(_o$Foo2))().toString; - (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _o$Foo3 = o.Foo, _m)._.bind(_o$Foo3))().toString(); - ((_o$Foo$self$getSelf = ((_o$Foo4 = o.Foo) === null || _o$Foo4 === void 0 ? void 0 : (_o$Foo4$self = _o$Foo4.self).getSelf.bind(_o$Foo4$self))()) === null || _o$Foo$self$getSelf === void 0 ? void 0 : _assertClassBrand(Foo, _o$Foo$self$getSelf, _m)._.bind(_o$Foo$self$getSelf))(); - ((_o$Foo$self$getSelf2 = ((_o$Foo$self = o.Foo.self) === null || _o$Foo$self === void 0 ? void 0 : _o$Foo$self.getSelf.bind(_o$Foo$self))()) === null || _o$Foo$self$getSelf2 === void 0 ? void 0 : _assertClassBrand(Foo, _o$Foo$self$getSelf2, _m)._.bind(_o$Foo$self$getSelf2))(); - ((_fn$Foo$self$getSelf = ((_fn = fn()) === null || _fn === void 0 || (_fn = _fn.Foo) === null || _fn === void 0 ? void 0 : (_fn$self = _fn.self).getSelf.bind(_fn$self))()) === null || _fn$Foo$self$getSelf === void 0 ? void 0 : _assertClassBrand(Foo, _fn$Foo$self$getSelf, _m)._.bind(_fn$Foo$self$getSelf))(); - ((_fn$Foo$self$getSelf2 = (fn === null || fn === void 0 || (_fn$Foo$self = fn().Foo.self) === null || _fn$Foo$self === void 0 ? void 0 : _fn$Foo$self.getSelf.bind(_fn$Foo$self))()) === null || _fn$Foo$self$getSelf2 === void 0 ? void 0 : _assertClassBrand(Foo, _fn$Foo$self$getSelf2, _m)._.bind(_fn$Foo$self$getSelf2))(); + (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _o$Foo = o.Foo, _m)._.bind(_o$Foo))(); + (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _o$Foo2 = o.Foo, _m)._.bind(_o$Foo2))().toString; + (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _o$Foo3 = o.Foo, _m)._.bind(_o$Foo3))().toString(); + ((_o$Foo$self$getSelf = ((_o$Foo4 = o.Foo) === null || _o$Foo4 === void 0 ? void 0 : (_o$Foo4$self = _o$Foo4.self).getSelf.bind(_o$Foo4$self))()) === null || _o$Foo$self$getSelf === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _o$Foo$self$getSelf, _m)._.bind(_o$Foo$self$getSelf))(); + ((_o$Foo$self$getSelf2 = ((_o$Foo$self = o.Foo.self) === null || _o$Foo$self === void 0 ? void 0 : _o$Foo$self.getSelf.bind(_o$Foo$self))()) === null || _o$Foo$self$getSelf2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _o$Foo$self$getSelf2, _m)._.bind(_o$Foo$self$getSelf2))(); + ((_fn$Foo$self$getSelf = ((_fn = fn()) === null || _fn === void 0 || (_fn = _fn.Foo) === null || _fn === void 0 ? void 0 : (_fn$self = _fn.self).getSelf.bind(_fn$self))()) === null || _fn$Foo$self$getSelf === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fn$Foo$self$getSelf, _m)._.bind(_fn$Foo$self$getSelf))(); + ((_fn$Foo$self$getSelf2 = (fn === null || fn === void 0 || (_fn$Foo$self = fn().Foo.self) === null || _fn$Foo$self === void 0 ? void 0 : _fn$Foo$self.getSelf.bind(_fn$Foo$self))()) === null || _fn$Foo$self$getSelf2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fn$Foo$self$getSelf2, _m)._.bind(_fn$Foo$self$getSelf2))(); } } _Foo = Foo; @@ -31,7 +30,7 @@ var _x = { babelHelpers.defineProperty(Foo, "self", _Foo); var _m = { _: function () { - return _assertClassBrand(_Foo, this, _x)._; + return babelHelpers.assertClassBrand(_Foo, this, _x)._; } }; new Foo().test(); \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/parenthesized-optional-member-call/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/parenthesized-optional-member-call/output.js index 9c7dbc482e99e9..73ec2478e79304 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/parenthesized-optional-member-call/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/parenthesized-optional-member-call/output.js @@ -1,5 +1,4 @@ var _Foo; -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } class Foo { static getSelf() { return Foo; @@ -15,13 +14,13 @@ class Foo { (Foo === null || Foo === void 0 ? void 0 : _m._.bind(Foo))(); (Foo === null || Foo === void 0 ? void 0 : _m._.bind(Foo))().toString; (Foo === null || Foo === void 0 ? void 0 : _m._.bind(Foo))().toString(); - (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _o$Foo = o.Foo, _m)._.bind(_o$Foo))(); - (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _o$Foo2 = o.Foo, _m)._.bind(_o$Foo2))().toString; - (o === null || o === void 0 ? void 0 : _assertClassBrand(Foo, _o$Foo3 = o.Foo, _m)._.bind(_o$Foo3))().toString(); - ((_o$Foo$self$getSelf = (o.Foo?.self.getSelf)()) === null || _o$Foo$self$getSelf === void 0 ? void 0 : _assertClassBrand(Foo, _o$Foo$self$getSelf, _m)._.bind(_o$Foo$self$getSelf))(); - ((_o$Foo$self$getSelf2 = (o.Foo.self?.getSelf)()) === null || _o$Foo$self$getSelf2 === void 0 ? void 0 : _assertClassBrand(Foo, _o$Foo$self$getSelf2, _m)._.bind(_o$Foo$self$getSelf2))(); - ((_fn$Foo$self$getSelf = (fn()?.Foo?.self.getSelf)()) === null || _fn$Foo$self$getSelf === void 0 ? void 0 : _assertClassBrand(Foo, _fn$Foo$self$getSelf, _m)._.bind(_fn$Foo$self$getSelf))(); - ((_fn$Foo$self$getSelf2 = (fn?.().Foo.self?.getSelf)()) === null || _fn$Foo$self$getSelf2 === void 0 ? void 0 : _assertClassBrand(Foo, _fn$Foo$self$getSelf2, _m)._.bind(_fn$Foo$self$getSelf2))(); + (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _o$Foo = o.Foo, _m)._.bind(_o$Foo))(); + (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _o$Foo2 = o.Foo, _m)._.bind(_o$Foo2))().toString; + (o === null || o === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _o$Foo3 = o.Foo, _m)._.bind(_o$Foo3))().toString(); + ((_o$Foo$self$getSelf = (o.Foo?.self.getSelf)()) === null || _o$Foo$self$getSelf === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _o$Foo$self$getSelf, _m)._.bind(_o$Foo$self$getSelf))(); + ((_o$Foo$self$getSelf2 = (o.Foo.self?.getSelf)()) === null || _o$Foo$self$getSelf2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _o$Foo$self$getSelf2, _m)._.bind(_o$Foo$self$getSelf2))(); + ((_fn$Foo$self$getSelf = (fn()?.Foo?.self.getSelf)()) === null || _fn$Foo$self$getSelf === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fn$Foo$self$getSelf, _m)._.bind(_fn$Foo$self$getSelf))(); + ((_fn$Foo$self$getSelf2 = (fn?.().Foo.self?.getSelf)()) === null || _fn$Foo$self$getSelf2 === void 0 ? void 0 : babelHelpers.assertClassBrand(Foo, _fn$Foo$self$getSelf2, _m)._.bind(_fn$Foo$self$getSelf2))(); } } _Foo = Foo; @@ -31,7 +30,7 @@ var _x = { babelHelpers.defineProperty(Foo, "self", _Foo); var _m = { _: function () { - return _assertClassBrand(_Foo, this, _x)._; + return babelHelpers.assertClassBrand(_Foo, this, _x)._; } }; new Foo().test(); \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/preserve-comments/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/preserve-comments/output.js index 8f3674e8de0f91..f2cb07b26a9e70 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/preserve-comments/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/preserve-comments/output.js @@ -1,10 +1,8 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } var _a = /*#__PURE__*/new WeakMap(); class C { constructor() { /* before a */ - _classPrivateFieldInitSpec(this, _a, void 0); + babelHelpers.classPrivateFieldInitSpec(this, _a, void 0); } /* after b */ } diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/private-in-derived/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/private-in-derived/output.js index 6271a9e7ed6796..bfadbea75ab145 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/private-in-derived/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/private-in-derived/output.js @@ -1,11 +1,7 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } -function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); } -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } var _outer = /*#__PURE__*/new WeakMap(); class Outer { constructor() { - _classPrivateFieldInitSpec(this, _outer, void 0); - class Test extends _classPrivateFieldGet(_outer, this) {} + babelHelpers.classPrivateFieldInitSpec(this, _outer, void 0); + class Test extends babelHelpers.classPrivateFieldGet2(_outer, this) {} } } \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/reevaluated/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/reevaluated/output.js index 851906a4a9c740..7df8e5b48bca5f 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/reevaluated/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/reevaluated/output.js @@ -1,24 +1,20 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } -function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); } -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } function classFactory() { var _Foo, _foo, _bar; return _foo = /*#__PURE__*/new WeakMap(), _Foo = class Foo { constructor() { - _classPrivateFieldInitSpec(this, _foo, "foo"); + babelHelpers.classPrivateFieldInitSpec(this, _foo, "foo"); } instance() { - return _classPrivateFieldGet(_foo, this); + return babelHelpers.classPrivateFieldGet2(_foo, this); } static() { - return _assertClassBrand(_Foo, Foo, _bar)._; + return babelHelpers.assertClassBrand(_Foo, Foo, _bar)._; } static instance(inst) { - return _classPrivateFieldGet(_foo, inst); + return babelHelpers.classPrivateFieldGet2(_foo, inst); } static static() { - return _assertClassBrand(_Foo, Foo, _bar)._; + return babelHelpers.assertClassBrand(_Foo, Foo, _bar)._; } }, _bar = { _: "bar" diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/reference-in-other-property/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/reference-in-other-property/output.js index 0a723b0fa8c8e9..7663cf5c868d59 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/reference-in-other-property/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/reference-in-other-property/output.js @@ -1,16 +1,12 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } -function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); } -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } var _two = /*#__PURE__*/new WeakMap(); var _private = /*#__PURE__*/new WeakMap(); var _four = /*#__PURE__*/new WeakMap(); class Foo { constructor() { - babelHelpers.defineProperty(this, "one", _classPrivateFieldGet(_private, this)); - _classPrivateFieldInitSpec(this, _two, _classPrivateFieldGet(_private, this)); - _classPrivateFieldInitSpec(this, _private, 0); - babelHelpers.defineProperty(this, "three", _classPrivateFieldGet(_private, this)); - _classPrivateFieldInitSpec(this, _four, _classPrivateFieldGet(_private, this)); + babelHelpers.defineProperty(this, "one", babelHelpers.classPrivateFieldGet2(_private, this)); + babelHelpers.classPrivateFieldInitSpec(this, _two, babelHelpers.classPrivateFieldGet2(_private, this)); + babelHelpers.classPrivateFieldInitSpec(this, _private, 0); + babelHelpers.defineProperty(this, "three", babelHelpers.classPrivateFieldGet2(_private, this)); + babelHelpers.classPrivateFieldInitSpec(this, _four, babelHelpers.classPrivateFieldGet2(_private, this)); } } \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/static-inherited/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/static-inherited/output.js index 13b31956c44187..bbb694e2ee2dd1 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/static-inherited/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/static-inherited/output.js @@ -1,10 +1,9 @@ -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } class Base { static getThis() { - return _assertClassBrand(Base, this, _foo)._; + return babelHelpers.assertClassBrand(Base, this, _foo)._; } static updateThis(val) { - return _foo._ = _assertClassBrand(Base, this, val); + return _foo._ = babelHelpers.assertClassBrand(Base, this, val); } static getClass() { return _foo._; @@ -18,7 +17,7 @@ var _foo = { }; class Sub1 extends Base { static update(val) { - return _foo2._ = _assertClassBrand(Sub1, this, val); + return _foo2._ = babelHelpers.assertClassBrand(Sub1, this, val); } } var _foo2 = { diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/static-shadow/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/static-shadow/output.js index 6fab953a322b21..1db71a8e4bae60 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/static-shadow/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/static-shadow/output.js @@ -1,10 +1,9 @@ -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } class Test { static method() { const _Test2 = 2; const func = () => { const _Test = 3; - return _assertClassBrand(Test, this, _x)._ + _Test; + return babelHelpers.assertClassBrand(Test, this, _x)._ + _Test; }; return func() + _Test2; } diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/super-call/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/super-call/output.js index 132a6d3a369b36..1674a5de035440 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/super-call/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/super-call/output.js @@ -1,5 +1,3 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } class A { foo() { return "bar"; @@ -9,6 +7,6 @@ var _foo = /*#__PURE__*/new WeakMap(); class B extends A { constructor(...args) { super(...args); - _classPrivateFieldInitSpec(this, _foo, super.foo()); + babelHelpers.classPrivateFieldInitSpec(this, _foo, super.foo()); } } \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/super-expression/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/super-expression/output.js index 7cc7ce51848a10..24ff2024d27e6a 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/super-expression/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/super-expression/output.js @@ -1,8 +1,6 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } var _bar = /*#__PURE__*/new WeakMap(); class Foo extends Bar { constructor() { - foo((super(), _classPrivateFieldInitSpec(this, _bar, "foo"), this)); + foo((super(), babelHelpers.classPrivateFieldInitSpec(this, _bar, "foo"), this)); } } \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/super-statement/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/super-statement/output.js index 8e48cb3d55f11b..8d73876adda19e 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/super-statement/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/super-statement/output.js @@ -1,9 +1,7 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } var _bar = /*#__PURE__*/new WeakMap(); class Foo extends Bar { constructor() { super(); - _classPrivateFieldInitSpec(this, _bar, "foo"); + babelHelpers.classPrivateFieldInitSpec(this, _bar, "foo"); } } \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/tagged-template-static/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/tagged-template-static/output.js index fdb3586193bec9..28d0164d0212b8 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/tagged-template-static/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/tagged-template-static/output.js @@ -1,7 +1,6 @@ -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } class Foo { static getReceiver() { - return _assertClassBrand(Foo, this, _tag)._.bind(this)``; + return babelHelpers.assertClassBrand(Foo, this, _tag)._.bind(this)``; } } var _tag = { diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/tagged-template/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/tagged-template/output.js index 644c4a7bfb6a9f..9768433b90af49 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/tagged-template/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/tagged-template/output.js @@ -1,14 +1,10 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } -function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); } -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } var _tag = /*#__PURE__*/new WeakMap(); class Foo { constructor() { - _classPrivateFieldInitSpec(this, _tag, void 0); + babelHelpers.classPrivateFieldInitSpec(this, _tag, void 0); } test() { - _classPrivateFieldGet(_tag, this).bind(this)``; + babelHelpers.classPrivateFieldGet2(_tag, this).bind(this)``; } } new Foo(); \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/update/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/update/output.js index 33a16228fa885d..093a5282fd347c 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/update/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/private/update/output.js @@ -1,18 +1,13 @@ -function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } -function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } -function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; } -function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); } -function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } var _foo = /*#__PURE__*/new WeakMap(); class Foo { constructor() { - _classPrivateFieldInitSpec(this, _foo, 0); + babelHelpers.classPrivateFieldInitSpec(this, _foo, 0); } test(other) { var _this$foo, _this$foo2, _this$foo3, _other$obj, _other$obj$foo, _other$obj$foo2, _other$obj2, _other$obj$foo3; - _classPrivateFieldSet(_foo, this, (_this$foo = _classPrivateFieldGet(_foo, this), _this$foo2 = _this$foo++, _this$foo)), _this$foo2; - _classPrivateFieldSet(_foo, this, (_this$foo3 = _classPrivateFieldGet(_foo, this), ++_this$foo3)); - _classPrivateFieldSet(_foo, _other$obj = other.obj, (_other$obj$foo = _classPrivateFieldGet(_foo, _other$obj), _other$obj$foo2 = _other$obj$foo++, _other$obj$foo)), _other$obj$foo2; - _classPrivateFieldSet(_foo, _other$obj2 = other.obj, (_other$obj$foo3 = _classPrivateFieldGet(_foo, _other$obj2), ++_other$obj$foo3)); + babelHelpers.classPrivateFieldSet2(_foo, this, (_this$foo = babelHelpers.classPrivateFieldGet2(_foo, this), _this$foo2 = _this$foo++, _this$foo)), _this$foo2; + babelHelpers.classPrivateFieldSet2(_foo, this, (_this$foo3 = babelHelpers.classPrivateFieldGet2(_foo, this), ++_this$foo3)); + babelHelpers.classPrivateFieldSet2(_foo, _other$obj = other.obj, (_other$obj$foo = babelHelpers.classPrivateFieldGet2(_foo, _other$obj), _other$obj$foo2 = _other$obj$foo++, _other$obj$foo)), _other$obj$foo2; + babelHelpers.classPrivateFieldSet2(_foo, _other$obj2 = other.obj, (_other$obj$foo3 = babelHelpers.classPrivateFieldGet2(_foo, _other$obj2), ++_other$obj$foo3)); } } \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/public/delete-super-property/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/public/delete-super-property/output.js index 06cf29978f1208..4e1105f5e1b8c0 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/public/delete-super-property/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/public/delete-super-property/output.js @@ -1,5 +1,3 @@ -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } new class { constructor() { babelHelpers.defineProperty(this, "y", delete super.x); @@ -15,6 +13,6 @@ babelHelpers.defineProperty(X1, "y", function () { throw new ReferenceError("'delete super.prop' is invalid"); }()); class X2 {} -babelHelpers.defineProperty(X2, "y", (_toPropertyKey(0), function () { +babelHelpers.defineProperty(X2, "y", (babelHelpers.toPropertyKey(0), function () { throw new ReferenceError("'delete super[expr]' is invalid"); }())); \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/public/static-super/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/public/static-super/output.js index c16eae4f5c15a8..a3c9229f4d0454 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/public/static-super/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/public/static-super/output.js @@ -1,9 +1,8 @@ var _B; -function _superPropGet(t, o, e, r) { var p = babelHelpers.get(babelHelpers.getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } class A {} babelHelpers.defineProperty(A, "prop", 1); class B extends A {} _B = B; babelHelpers.defineProperty(B, "prop", 2); -babelHelpers.defineProperty(B, "propA", _superPropGet(_B, "prop", _B)); -babelHelpers.defineProperty(B, "getPropA", () => _superPropGet(_B, "prop", _B)); \ No newline at end of file +babelHelpers.defineProperty(B, "propA", babelHelpers.superPropGet(_B, "prop", _B)); +babelHelpers.defineProperty(B, "getPropA", () => babelHelpers.superPropGet(_B, "prop", _B)); \ No newline at end of file diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/regression/6154/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/regression/6154/output.js index b96f8fcfefbd76..d01cca265f24c1 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/regression/6154/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties-babel/test/fixtures/regression/6154/output.js @@ -1,4 +1,3 @@ -function _superPropGet(t, o, e, r) { var p = babelHelpers.get(babelHelpers.getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } class Test { constructor() { var _Other; @@ -9,6 +8,6 @@ class Test { } } _Other = Other; - babelHelpers.defineProperty(Other, "a", () => _superPropGet(_Other, "test", _Other)); + babelHelpers.defineProperty(Other, "a", () => babelHelpers.superPropGet(_Other, "test", _Other)); } } \ No newline at end of file