export function applyMixins ( derivedCtor , baseCtors ) { for ( const baseCtor of baseCtors ) { for ( const name of Object . getOwnPropertyNames ( baseCtor . prototype ) ) { const baseCtorName = Object . getOwnPropertyDescriptor ( baseCtor . prototype , name ) ; if ( baseCtorName ) { Object . defineProperty ( derivedCtor . prototype , name , baseCtorName ) ; } } } }