import { EventDataType } from '@types' ; interface RootElementType extends HTMLElement { registerEventListener : ( eventData : EventDataType ) => { } ; } const rootElement = document . querySelector ( '#root' ) ; const registerEventToRoot = ( eventData ) => rootElement ?. registerEventListener ( eventData ) ; export { registerEventToRoot } ;