UNPKG

fabric

Version:

Object model for HTML5 canvas, and SVG-to-canvas parser. Backed by jsdom and node-canvas.

15 lines (13 loc) 515 B
/*** * https://www.typescriptlang.org/docs/handbook/mixins.html#alternative-pattern */ function applyMixins(derivedCtor, constructors) { constructors.forEach(baseCtor => { Object.getOwnPropertyNames(baseCtor.prototype).forEach(name => { name !== 'constructor' && Object.defineProperty(derivedCtor.prototype, name, Object.getOwnPropertyDescriptor(baseCtor.prototype, name) || Object.create(null)); }); }); return derivedCtor; } export { applyMixins }; //# sourceMappingURL=applyMixins.mjs.map