Type alias EventListenersCategory

EventListeners: Record<Parameters<EventEmitter["on"]>[0], Parameters<EventEmitter["on"]>[1]>

An object where keys are the names of events and values are the type signature of the listener function.

Example

interface SafeEvents extends EventListeners {
start: () => void;
finish: (error: Error) => void;
}

Typed EventEmitter