@sequeljs/ast
Version:
A SQL AST manager for JavaScript
16 lines • 683 B
JavaScript
;
/** @internal */ /** */
Object.defineProperty(exports, "__esModule", { value: true });
function applyMixins(derivedCtor, baseCtors) {
baseCtors.forEach((baseCtor) => {
Object.getOwnPropertyNames(baseCtor.prototype)
.filter((name) => name !== 'constructor')
.forEach((name) => {
const propertyDescriptor = Object.getOwnPropertyDescriptor(baseCtor.prototype, name);
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
Object.defineProperty(derivedCtor.prototype, name, propertyDescriptor);
});
});
}
exports.default = applyMixins;
//# sourceMappingURL=applyMixins.js.map