fox-block-builder
Version:
Maintainable code for loop slack-block-kit-like modal builder
19 lines • 752 B
JavaScript
/*
eslint-disable
@typescript-eslint/explicit-module-boundary-types,
@typescript-eslint/no-explicit-any
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.applyMixins = applyMixins;
function applyMixins(derivedCtor, baseCtors) {
const { constructor } = derivedCtor.prototype;
baseCtors.forEach((baseCtor) => {
Object.getOwnPropertyNames(baseCtor.prototype).forEach((name) => {
const descriptor = Object.getOwnPropertyDescriptor(baseCtor.prototype, name);
Object.defineProperty(derivedCtor.prototype, name, descriptor);
});
});
derivedCtor.prototype.constructor = constructor; // eslint-disable-line no-param-reassign
}
//# sourceMappingURL=apply-mixins.js.map
;