import "core-js" ; export function mixin ( behaviour , sharedBehaviour = { } ) { const instanceKeys = Reflect . ownKeys ( behaviour ) ; const sharedKeys = Reflect . ownKeys ( sharedBehaviour ) ; const typeTag = Symbol ( "isA" ) ; function _mixin ( workingClass ) { for ( const property of instanceKeys ) { Object . defineProperty ( workingClass . prototype , property , { value : behaviour [ property ] , writable : true , } ) ; } Object . defineProperty ( workingClass . prototype , typeTag , { value : true } ) ; for ( const property of sharedKeys ) { Object . defineProperty ( workingClass , property , { enumerable : sharedBehaviour . propertyIsEnumerable ( property ) , value : sharedBehaviour [ property ] , writable : true , } ) ; } } Object . defineProperty ( _mixin , Symbol . hasInstance , { value : ( instance ) => ! ! instance [ typeTag ] , writable : true , } ) ; return _mixin ; } export default mixin ;