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

30 lines
646 B
JavaScript

var Foo = function Foo() {
"use strict";
babelHelpers.classCallCheck(this, Foo);
babelHelpers.defineProperty(this, "one", babelHelpers.classPrivateFieldGet(this, _private));
_two.set(this, {
writable: true,
value: babelHelpers.classPrivateFieldGet(this, _private)
});
_private.set(this, {
writable: true,
value: 0
});
babelHelpers.defineProperty(this, "three", babelHelpers.classPrivateFieldGet(this, _private));
_four.set(this, {
writable: true,
value: babelHelpers.classPrivateFieldGet(this, _private)
});
};
var _two = new WeakMap();
var _private = new WeakMap();
var _four = new WeakMap();