createSuper.js 635 B

1234567891011121314151617
  1. import _Reflect$construct from "core-js-pure/features/reflect/construct.js";
  2. import getPrototypeOf from "./getPrototypeOf.js";
  3. import isNativeReflectConstruct from "./isNativeReflectConstruct.js";
  4. import possibleConstructorReturn from "./possibleConstructorReturn.js";
  5. function _createSuper(t) {
  6. var r = isNativeReflectConstruct();
  7. return function () {
  8. var e,
  9. o = getPrototypeOf(t);
  10. if (r) {
  11. var s = getPrototypeOf(this).constructor;
  12. e = _Reflect$construct(o, arguments, s);
  13. } else e = o.apply(this, arguments);
  14. return possibleConstructorReturn(this, e);
  15. };
  16. }
  17. export { _createSuper as default };