File size: 615 Bytes
cfbbc1a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
"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;