mirror of
https://github.com/hanzoai/babel.git
synced 2026-10-30 14:46:06 +00:00
* add test cases * fix: memoise class binding when lowering static elements and private methods * update test fixtures * update test fixtures
26 lines
628 B
JavaScript
26 lines
628 B
JavaScript
var _class;
|
|
class Base {
|
|
superMethod() {
|
|
return 'good';
|
|
}
|
|
}
|
|
var _privateMethod = /*#__PURE__*/babelHelpers.classPrivateFieldLooseKey("privateMethod");
|
|
class Sub extends Base {
|
|
constructor(...args) {
|
|
super(...args);
|
|
Object.defineProperty(this, _privateMethod, {
|
|
value: _privateMethod2
|
|
});
|
|
}
|
|
superMethod() {
|
|
return 'bad';
|
|
}
|
|
publicMethod() {
|
|
return babelHelpers.classPrivateFieldLooseBase(this, _privateMethod)[_privateMethod]();
|
|
}
|
|
}
|
|
_class = Sub;
|
|
function _privateMethod2() {
|
|
return babelHelpers.get(babelHelpers.getPrototypeOf(_class.prototype), "superMethod", this).call(this);
|
|
}
|