mirror of
https://github.com/swc-project/swc.git
synced 2025-01-04 19:47:10 +03:00
e46a842e99
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)
14 lines
238 B
JavaScript
14 lines
238 B
JavaScript
var _foo = /*#__PURE__*/babelHelpers.classPrivateFieldLooseKey("foo");
|
|
|
|
class Foo {
|
|
test(other) {
|
|
return Object.prototype.hasOwnProperty.call(other, _foo);
|
|
}
|
|
|
|
}
|
|
|
|
Object.defineProperty(Foo, _foo, {
|
|
writable: true,
|
|
value: 1
|
|
});
|