recoder-code
Version:
🚀 AI-powered development platform - Chat with 32+ models, build projects, automate workflows. Free models included!
19 lines (18 loc) • 615 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.MergeWithValues = void 0;
/* eslint-disable @typescript-eslint/no-empty-object-type */
const MergeWithValues = (data) => {
return (Metatype) => {
const Type = class extends Metatype {
constructor(...args) {
super(...args);
}
};
const token = Metatype.name + JSON.stringify(data);
Object.defineProperty(Type, 'name', { value: token });
Object.assign(Type.prototype, data);
return Type;
};
};
exports.MergeWithValues = MergeWithValues;