Path: blob/master/node_modules/@babel/runtime/helpers/construct.js
1126 views
var setPrototypeOf = require("./setPrototypeOf.js");12var isNativeReflectConstruct = require("./isNativeReflectConstruct.js");34function _construct(Parent, args, Class) {5if (isNativeReflectConstruct()) {6module.exports = _construct = Reflect.construct.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports;7} else {8module.exports = _construct = function _construct(Parent, args, Class) {9var a = [null];10a.push.apply(a, args);11var Constructor = Function.bind.apply(Parent, a);12var instance = new Constructor();13if (Class) setPrototypeOf(instance, Class.prototype);14return instance;15}, module.exports.__esModule = true, module.exports["default"] = module.exports;16}1718return _construct.apply(null, arguments);19}2021module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;2223