source: node_modules/@babel/runtime-corejs3/helpers/esm/createSuper.js

main
Last change on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 756 bytes
Line 
1import _Reflect$construct from "core-js-pure/features/reflect/construct.js";
2import getPrototypeOf from "./getPrototypeOf.js";
3import isNativeReflectConstruct from "./isNativeReflectConstruct.js";
4import possibleConstructorReturn from "./possibleConstructorReturn.js";
5export default function _createSuper(Derived) {
6 var hasNativeReflectConstruct = isNativeReflectConstruct();
7 return function _createSuperInternal() {
8 var Super = getPrototypeOf(Derived),
9 result;
10 if (hasNativeReflectConstruct) {
11 var NewTarget = getPrototypeOf(this).constructor;
12 result = _Reflect$construct(Super, arguments, NewTarget);
13 } else {
14 result = Super.apply(this, arguments);
15 }
16 return possibleConstructorReturn(this, result);
17 };
18}
Note: See TracBrowser for help on using the repository browser.