* 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.
39 lines
697 B
JavaScript
39 lines
697 B
JavaScript
var Foo = function Foo() {
|
|
"use strict";
|
|
|
|
babelHelpers.classCallCheck(this, Foo);
|
|
|
|
_prop.set(this, {
|
|
writable: true,
|
|
value: "foo"
|
|
});
|
|
};
|
|
|
|
var _prop = new WeakMap();
|
|
|
|
var Bar =
|
|
/*#__PURE__*/
|
|
function (_Foo) {
|
|
"use strict";
|
|
|
|
babelHelpers.inherits(Bar, _Foo);
|
|
|
|
function Bar(...args) {
|
|
var _this;
|
|
|
|
babelHelpers.classCallCheck(this, Bar);
|
|
_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Bar).call(this, ...args));
|
|
|
|
_prop2.set(babelHelpers.assertThisInitialized(babelHelpers.assertThisInitialized(_this)), {
|
|
writable: true,
|
|
value: "bar"
|
|
});
|
|
|
|
return _this;
|
|
}
|
|
|
|
return Bar;
|
|
}(Foo);
|
|
|
|
var _prop2 = new WeakMap();
|