mirror of
https://github.com/hanzoai/babel.git
synced 2026-10-30 14:46:06 +00:00
17 lines
341 B
JavaScript
17 lines
341 B
JavaScript
class Base {
|
|
constructor(obj) {
|
|
return obj;
|
|
}
|
|
}
|
|
let counter = 0;
|
|
var _foo = /*#__PURE__*/new WeakMap();
|
|
class Derived extends Base {
|
|
constructor(...args) {
|
|
super(...args);
|
|
babelHelpers.classPrivateFieldInitSpec(this, _foo, ++counter);
|
|
}
|
|
static get(obj) {
|
|
return babelHelpers.classPrivateFieldGet2(_foo, obj);
|
|
}
|
|
}
|