Event map object where keys are event names and values are argument tuples
Note: Use type aliases (not interface) for your event maps to avoid
"Index signature is missing" errors. TypeScript treats them differently.
Unsubscribe from an event
Event name
Event handler to remove
Subscribe to an event
Event name
Event handler
Unsubscribe function
Subscribe to an event for one-time execution
Event name
Event handler
Unsubscribe function
Remove all listeners for a specific event or all events
Optionalevent: keyof TOptional event name. If not provided, removes all listeners.
Interface for a type-safe event emitter