Type representing a function that subscribes to events.
The type of the event listener payload.
The name of the event.
The event listener to add.
The function to unsubscribe the event listener.
Type representing a function that subscribes to events.