import { ComponentEvent } from 'react-native-navigation' ; function triggerIfComponentIdMatches < T extends ComponentEvent > ( handler , event , componentId ? ) { if ( componentId && event . componentId !== componentId ) { return ; } handler ( event ) ; } export default triggerIfComponentIdMatches ;