export function getByKey < K , V > ( listOfTuples , key ) { return listOfTuples ? listOfTuples . find ( ( [ k ] ) => k === key ) ?. [ 1 ] : undefined ; } export function getEntryByKey < K , V > ( listOfTuples , key ) { return listOfTuples ? listOfTuples . find ( ( [ k ] ) => k === key ) : undefined ; } type ClickHandler = ( event : React . MouseEvent < HTMLElement , MouseEvent > ) => void ; export function prevent ( f ) { return ( e ) : void => { e . nativeEvent . stopImmediatePropagation ( ) ; e . stopPropagation ( ) ; f ( e ) ; } ; }