* 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.
20 lines
295 B
JavaScript
20 lines
295 B
JavaScript
var Foo = function Foo() {
|
|
"use strict";
|
|
|
|
babelHelpers.classCallCheck(this, Foo);
|
|
|
|
_x.set(this, {
|
|
writable: true,
|
|
value: 0
|
|
});
|
|
|
|
_y.set(this, {
|
|
writable: true,
|
|
value: babelHelpers.classPrivateFieldGet(this, _x)
|
|
});
|
|
};
|
|
|
|
var _x = new WeakMap();
|
|
|
|
var _y = new WeakMap();
|