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

24 lines
736 B
JavaScript

var _privateField = babelHelpers.classPrivateFieldLooseKey("privateField");
var _privateFieldValue = babelHelpers.classPrivateFieldLooseKey("privateFieldValue");
class Cl {
constructor() {
Object.defineProperty(this, _privateFieldValue, {
get: _get_privateFieldValue,
set: void 0
});
Object.defineProperty(this, _privateField, {
writable: true,
value: 0
});
babelHelpers.classPrivateFieldLooseBase(this, _privateFieldValue)[_privateFieldValue] = 1;
[babelHelpers.classPrivateFieldLooseBase(this, _privateFieldValue)[_privateFieldValue]] = [1];
}
}
var _get_privateFieldValue = function () {
return babelHelpers.classPrivateFieldLooseBase(this, _privateField)[_privateField];
};