mirror of
https://github.com/swc-project/swc.git
synced 2024-12-21 12:41:54 +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)
16 lines
352 B
JavaScript
16 lines
352 B
JavaScript
var _brand_check_x = new WeakSet(), _brand_check_A = new WeakSet();
|
|
class A {
|
|
#x = void _brand_check_x.add(this);
|
|
#m() {
|
|
}
|
|
test() {
|
|
_brand_check_x.has(this);
|
|
_brand_check_A.has(this);
|
|
_brand_check_x.has(this);
|
|
_brand_check_A.has(this);
|
|
}
|
|
constructor(){
|
|
_brand_check_A.add(this);
|
|
}
|
|
}
|