forked from babel/babel
/
output.js
32 lines (24 loc) 路 821 Bytes
/
output.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
function _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError("attempted to use private field on non-instance"); } return receiver; }
var id = 0;
function _classPrivateFieldLooseKey(name) { return "__private_" + id++ + "_" + name; }
var _m = _classPrivateFieldLooseKey("m");
class Foo {
constructor() {
Object.defineProperty(this, _m, {
writable: true,
value: void 0
});
}
init() {
_classPrivateFieldLooseBase(this, _m)[_m] = (...args) => args;
}
static test() {
const f = new Foo();
f.init();
return _classPrivateFieldLooseBase(f, _m)[_m]?.(...arguments);
}
static testNull() {
const f = new Foo();
return _classPrivateFieldLooseBase(f, _m)[_m]?.(...arguments);
}
}