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

Function _extendableBuiltin

docs/app/js/sanddance-app.js:69234–69251  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

69232parcelHelpers.defineInteropFlag(exports);
69233var _common = require("../../lib/common");
69234function _extendableBuiltin(cls) {
69235 function ExtendableBuiltin() {
69236 var instance = Reflect.construct(cls, Array.from(arguments));
69237 Object.setPrototypeOf(instance, Object.getPrototypeOf(this));
69238 return instance;
69239 }
69240 ExtendableBuiltin.prototype = Object.create(cls.prototype, {
69241 constructor: {
69242 value: cls,
69243 enumerable: false,
69244 writable: true,
69245 configurable: true
69246 }
69247 });
69248 if (Object.setPrototypeOf) Object.setPrototypeOf(ExtendableBuiltin, cls);
69249 else ExtendableBuiltin.__proto__ = cls;
69250 return ExtendableBuiltin;
69251}
69252class MathArray extends _extendableBuiltin(Array) {
69253 clone() {
69254 return new this.constructor().copy(this);

Callers 1

MathArrayClass · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected