type Constructor = new (...args: any[]) => {};
export function mixin<TBase extends Constructor>(Base: TBase[], count = 0): TBase {
const currentClass = Base[count];
if (count === Base.length - 1){
return class extends currentClass {};
} else {
count++;
return class extends mixin(Base, count++) {};
}
}
// должно получится типа так
// return class extends one
// return class extends two
// return class extends three