You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

18 lines
615 B

"use strict";
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;