Nicolò Ribaudo ec69b4bb12 Save full descriptor instead of only value for private fields. (#8318)
* 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.
2018-07-27 16:24:57 -04:00

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();