Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com> Co-authored-by: Babel Bot <babel-bot@users.noreply.github.com>
39 lines
848 B
JavaScript
39 lines
848 B
JavaScript
var _nullish = new WeakMap();
|
|
|
|
var _and = new WeakMap();
|
|
|
|
var _or = new WeakMap();
|
|
|
|
class Foo {
|
|
constructor() {
|
|
_nullish.set(this, {
|
|
writable: true,
|
|
value: 0
|
|
});
|
|
|
|
_and.set(this, {
|
|
writable: true,
|
|
value: 0
|
|
});
|
|
|
|
_or.set(this, {
|
|
writable: true,
|
|
value: 0
|
|
});
|
|
}
|
|
|
|
self() {
|
|
return this;
|
|
}
|
|
|
|
test() {
|
|
var _this$self;
|
|
|
|
babelHelpers.classPrivateFieldGet(this, _nullish) ?? babelHelpers.classPrivateFieldSet(this, _nullish, 42);
|
|
babelHelpers.classPrivateFieldGet(this, _and) && babelHelpers.classPrivateFieldSet(this, _and, 0);
|
|
babelHelpers.classPrivateFieldGet(this, _or) || babelHelpers.classPrivateFieldSet(this, _or, 0);
|
|
babelHelpers.classPrivateFieldGet(_this$self = this.self(), _nullish) ?? babelHelpers.classPrivateFieldSet(_this$self, _nullish, 42);
|
|
}
|
|
|
|
}
|