xxxxxxxxxx
function mixin<T extends { new (args: any[]): {} }>(base: T, obj) {
return class extends base {
constructor(args: any[]) {
super(args);
Object.assign(this, obj);
}
};
}
function mixin(base: any, obj: any) {
const mixed = Object.create(base.prototype);
Object.assign(mixed, obj);
return mixed;
}
export default mixin;