* Revert "Move subclass inheritance to end (#7772)" This reverts commit f8ab9466d331871a90f458af40b14e8d831e0c29. * Only use getPrototypeOf if setPrototypeOf is implemented * Update fixtures * Helpers updates * Update fixtures * Fall back to getPrototypeOf * Update fixtures
37 lines
739 B
JavaScript
37 lines
739 B
JavaScript
"use strict";
|
|
|
|
let Hello = function Hello() {
|
|
babelHelpers.classCallCheck(this, Hello);
|
|
return {
|
|
toString() {
|
|
return 'hello';
|
|
}
|
|
|
|
};
|
|
};
|
|
|
|
let Outer =
|
|
/*#__PURE__*/
|
|
function (_Hello) {
|
|
babelHelpers.inherits(Outer, _Hello);
|
|
|
|
function Outer() {
|
|
var _this;
|
|
|
|
babelHelpers.classCallCheck(this, Outer);
|
|
|
|
var _this2 = _this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Outer).call(this));
|
|
|
|
let Inner = function Inner() {
|
|
babelHelpers.classCallCheck(this, Inner);
|
|
babelHelpers.defineProperty(this, _this2, "hello");
|
|
};
|
|
|
|
return babelHelpers.possibleConstructorReturn(_this, new Inner());
|
|
}
|
|
|
|
return Outer;
|
|
}(Hello);
|
|
|
|
expect(new Outer().hello).toBe('hello');
|