Huáng Jùnliàng bdb207cb75
Class static private field destructure set (#12917)
* fix: support static private field destructure set ([C.#p] = [0])

* 🚧

* fix: add compatibility warning for older @babel/helper versions

* refactor: extract common routines among classPrivateFiled helpers

* More 🚧
2021-03-03 16:38:16 -05:00

20 lines
373 B
JavaScript

var _method = new WeakSet();
class A {
self() {
this.counter++;
return this;
}
constructor() {
_method.add(this);
babelHelpers.defineProperty(this, "counter", 0);
this.self(), 2, babelHelpers.readOnlyError("#method");
[babelHelpers.classPrivateFieldDestructureSet(this, _method).value] = [2];
}
}
var _method2 = function _method2() {};