Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com> Co-authored-by: Babel Bot <babel-bot@users.noreply.github.com>
27 lines
477 B
JavaScript
27 lines
477 B
JavaScript
var _m = new WeakMap();
|
|
|
|
class Foo {
|
|
constructor() {
|
|
_m.set(this, {
|
|
writable: true,
|
|
value: void 0
|
|
});
|
|
}
|
|
|
|
init() {
|
|
babelHelpers.classPrivateFieldSet(this, _m, (...args) => args);
|
|
}
|
|
|
|
static test() {
|
|
const f = new Foo();
|
|
f.init();
|
|
return babelHelpers.classPrivateFieldGet(f, _m)?.apply(f, arguments);
|
|
}
|
|
|
|
static testNull() {
|
|
const f = new Foo();
|
|
return babelHelpers.classPrivateFieldGet(f, _m)?.apply(f, arguments);
|
|
}
|
|
|
|
}
|