mixins.ts 297 Bytes Edit Raw Blame History 1 2 3 4 5 6 7 8 9 export function Mixins(...mixins: Function[]) { return function(target: Function) { mixins.forEach(mixin => { Object.getOwnPropertyNames(mixin.prototype).forEach(name => { target.prototype[name] = mixin.prototype[name]; }); }); }; }