Your IP : 216.73.216.79


Current Path : /var/www/html/learn/node_modules/@babel/runtime/helpers/esm/
Upload File :
Current File : /var/www/html/learn/node_modules/@babel/runtime/helpers/esm/createSuper.js

import getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
import isNativeReflectConstruct from "@babel/runtime/helpers/esm/isNativeReflectConstruct";
import possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
export default function _createSuper(Derived) {
  var hasNativeReflectConstruct = isNativeReflectConstruct();
  return function _createSuperInternal() {
    var Super = getPrototypeOf(Derived),
        result;

    if (hasNativeReflectConstruct) {
      var NewTarget = getPrototypeOf(this).constructor;
      result = Reflect.construct(Super, arguments, NewTarget);
    } else {
      result = Super.apply(this, arguments);
    }

    return possibleConstructorReturn(this, result);
  };
}