construct.js 662 B

12345678910111213
  1. import _Reflect$construct from "core-js-pure/features/reflect/construct.js";
  2. import _pushInstanceProperty from "core-js-pure/features/instance/push.js";
  3. import _bindInstanceProperty from "core-js-pure/features/instance/bind.js";
  4. import isNativeReflectConstruct from "./isNativeReflectConstruct.js";
  5. import setPrototypeOf from "./setPrototypeOf.js";
  6. function _construct(t, e, r) {
  7. if (isNativeReflectConstruct()) return _Reflect$construct.apply(null, arguments);
  8. var o = [null];
  9. _pushInstanceProperty(o).apply(o, e);
  10. var p = new (_bindInstanceProperty(t).apply(t, o))();
  11. return r && setPrototypeOf(p, r.prototype), p;
  12. }
  13. export { _construct as default };