@sequeljs/ast
Version:
A SQL AST manager for JavaScript
13 lines • 590 B
JavaScript
/** @internal */ /** */
export default 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);
});
});
}
//# sourceMappingURL=applyMixins.js.map