MCPcopy Create free account
hub / github.com/microsoft/SandDance / _construct

Function _construct

docs/app/js/sanddance-app.js:62336–62349  ·  view source on GitHub ↗
(Parent1, args1, Class1)

Source from the content-addressed store, hash-verified

62334var _isNativeReflectConstructJs = require("./isNativeReflectConstruct.js");
62335var _isNativeReflectConstructJsDefault = parcelHelpers.interopDefault(_isNativeReflectConstructJs);
62336function _construct(Parent1, args1, Class1) {
62337 if ((0, _isNativeReflectConstructJsDefault.default)()) _construct = Reflect.construct.bind();
62338 else _construct = function _construct(Parent, args, Class) {
62339 var a = [
62340 null
62341 ];
62342 a.push.apply(a, args);
62343 var Constructor = Function.bind.apply(Parent, a);
62344 var instance = new Constructor();
62345 if (Class) (0, _setPrototypeOfJsDefault.default)(instance, Class.prototype);
62346 return instance;
62347 };
62348 return _construct.apply(null, arguments);
62349}
62350exports.default = _construct;
62351
62352},{"./setPrototypeOf.js":"1Wga1","./isNativeReflectConstruct.js":"lc3MM","@parcel/transformer-js/src/esmodule-helpers.js":"jA2du"}],"lc3MM":[function(require,module,exports) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected