function composeEventHandlers < E > ( originalEventHandler ? , ourEventHandler ? , { checkForDefaultPrevented = true } = { } ) { return function handleEvent ( event ) { originalEventHandler ?. ( event ) ; if ( checkForDefaultPrevented === false || ! ( ( event as unknown ) as Event ) . defaultPrevented ) { return ourEventHandler ?. ( event ) ; } } ; } export { composeEventHandlers } ;