Registers an event listener.
The event type.
The callback function.
Dispatches an event.
The event type.
OptionaleventData: Record<string, unknown>Optional data associated with the event.
Removes a registered event listener.
The event type.
The callback function to remove.
Interface for event dispatching and listening.