example param elemProps param componentProps export function mergeCallback < T extends Function > ( callback1 , callback2 ? ) { if ( callback2 ) { return ( ( ( ... args ) => { callback1 . apply ( null , args ) ; callback2 . apply ( null , args ) ; } ) as any ) as T ; } else { return callback1 ; } }