export function applyMixins(derivedCtor: any, baseCtors: any[]) { baseCtors.forEach(baseCtor => { Object.getOwnPropertyNames(baseCtor.prototype).forEach(name => { Object.defineProperty( derivedCtor.prototype, name, Object.getOwnPropertyDescriptor(baseCtor.prototype, name) ); }); }); } // Can be used to return more specific errors. export const VERENIGING_NOT_FOUND_MESSAGE = "Vereniging niet gevonden"; export const TEAM_NOT_FOUND_MESSAGE = "Team niet gevonden"; export const POULE_NOT_FOUND_MESSAGE = "Poule niet gevonden";