* Save full descriptor instead of only value for private fields. Decorators can make private fields non-writable, so we need to store this information somewhere. The descriptor can also be used to implement private accessors.
18 lines
298 B
JavaScript
18 lines
298 B
JavaScript
var C = function C() {
|
|
"use strict";
|
|
|
|
babelHelpers.classCallCheck(this, C);
|
|
babelHelpers.defineProperty(this, "y", babelHelpers.classPrivateFieldGet(this, _x));
|
|
|
|
_x.set(this, {
|
|
writable: true,
|
|
value: void 0
|
|
});
|
|
};
|
|
|
|
var _x = new WeakMap();
|
|
|
|
expect(() => {
|
|
new C();
|
|
}).toThrow();
|