mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
* clean * improve * tests * fix lint * old helpers * add fail test * fix * Update packages/babel-helpers/src/helpers/superPropGet.ts Co-authored-by: Nicolò Ribaudo <[email protected]> * review * fix lint * minVersion --------- Co-authored-by: Nicolò Ribaudo <[email protected]>
21 lines
390 B
JavaScript
21 lines
390 B
JavaScript
"use strict";
|
|
|
|
var _obj;
|
|
const Hello = {
|
|
toString: function () {
|
|
return 'hello';
|
|
}
|
|
};
|
|
const Outer = _obj = {
|
|
constructor: function () {
|
|
class Inner {
|
|
[babelHelpers.superPropGet(_obj, "toString", this, 2)([])]() {
|
|
return 'hello';
|
|
}
|
|
}
|
|
return new Inner();
|
|
}
|
|
};
|
|
Object.setPrototypeOf(Outer, Hello);
|
|
expect(Outer.constructor().hello()).toBe('hello');
|