Felipe Armoni fdfe97879e
Disallow reinitializing private elements (#13601)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
Co-authored-by: Justin Ridgewell <justin@ridgewell.name>
2021-08-30 12:44:38 +02:00

25 lines
402 B
JavaScript

var _bar = /*#__PURE__*/new WeakMap();
class Foo {
constructor() {
babelHelpers.classPrivateFieldInitSpec(this, _bar, {
writable: true,
value: "bar"
});
}
static test() {
return babelHelpers.classStaticPrivateFieldSpecGet(Foo, Foo, _foo);
}
test() {
return babelHelpers.classPrivateFieldGet(this, _bar);
}
}
var _foo = {
writable: true,
value: "foo"
};