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
551 B
JavaScript

var Foo =
/*#__PURE__*/
function () {
"use strict";
function Foo() {
babelHelpers.classCallCheck(this, Foo);
_foo.set(this, {
writable: true,
value: function () {
return this;
}
});
}
babelHelpers.createClass(Foo, [{
key: "test",
value: function test(other) {
var _other$obj;
babelHelpers.classPrivateFieldGet(this, _foo).call(this);
babelHelpers.classPrivateFieldGet(_other$obj = other.obj, _foo).call(_other$obj);
}
}]);
return Foo;
}();
var _foo = new WeakMap();