export default function combineEventHandlers < A , B , C , D > ( a , b , c , d ) ; export default function combineEventHandlers < A , B , C > ( a , b , c ) ; export default function combineEventHandlers < A , B > ( a , b ) ; /**
 * combineEventHandlers expects prop objects with React
 * like onEvent handlers e.g. onClick, onKeydown and combine them
 * by calling them one after another.
 */ export default function combineEventHandlers ( ... propObjects ) { const result = { } ; propObjects . forEach ( ( o ) => { Object . keys ( o ) . forEach ( ( k ) => { if ( k in result ) { const prev = result [ k ] ; result [ k ] = ( ... args ) => { prev ( ... args ) ; o [ k ] ( ... args ) ; } ; } else { result [ k ] = o [ k ] ; } } ) ; } ) ; return result ; }