swc/ecmascript/transforms/proposal/tests/private-in-object/.private-loose/method/output.js
Donny/강동윤 e46a842e99
feat(es/parser, es/transform): Implement ergonomic brand checking (#2079)
swc_ecma_parser:
 - Implement parsing of private properties in object literals.

swc_ecma_transforms_base:
 - `fixer`: Handle `const [a = (b, c)]`.

swc_ecma_transforms_compat:
 - `class_properties`: Support ergonomic brand checks. (#2064)

swc_ecma_transforms_proposal:
 - Implement ergonomic brand checks for private fields. (#2064)
2021-09-27 08:03:48 +00:00

23 lines
464 B
JavaScript

var _foo = /*#__PURE__*/babelHelpers.classPrivateFieldLooseKey("foo");
let Foo = /*#__PURE__*/function () {
"use strict";
function Foo() {
babelHelpers.classCallCheck(this, Foo);
Object.defineProperty(this, _foo, {
value: _foo2
});
}
babelHelpers.createClass(Foo, [{
key: "test",
value: function test(other) {
return Object.prototype.hasOwnProperty.call(other, _foo);
}
}]);
return Foo;
}();
function _foo2() {}