Interface TypedEventEmitter<Events>
Methods
addListener
-
Type parameters
-
E: string | number | symbol
Parameters
-
event: E
-
listener: Events[E]
emit
- emit<E>(event: E, ...args: Arguments<Events[E]>): boolean
-
Type parameters
-
E: string | number | symbol
Parameters
Returns boolean
eventNames
- eventNames(): (string | symbol | keyof Events)[]
-
Returns (string | symbol | keyof Events)[]
getMaxListeners
- getMaxListeners(): number
listenerCount
- listenerCount<E>(event: E): number
-
Type parameters
-
E: string | number | symbol
Parameters
Returns number
listeners
- listeners<E>(event: E): Function[]
-
Type parameters
-
E: string | number | symbol
Parameters
Returns Function[]
off
-
Type parameters
-
E: string | number | symbol
Parameters
-
event: E
-
listener: Events[E]
on
-
Type parameters
-
E: string | number | symbol
Parameters
-
event: E
-
listener: Events[E]
once
-
Type parameters
-
E: string | number | symbol
Parameters
-
event: E
-
listener: Events[E]
prependListener
-
Type parameters
-
E: string | number | symbol
Parameters
-
event: E
-
listener: Events[E]
prependOnceListener
-
Type parameters
-
E: string | number | symbol
Parameters
-
event: E
-
listener: Events[E]
rawListeners
- rawListeners<E>(event: E): Function[]
-
Type parameters
-
E: string | number | symbol
Parameters
Returns Function[]
removeAllListeners
-
Type parameters
-
E: string | number | symbol
Parameters
removeListener
-
Type parameters
-
E: string | number | symbol
Parameters
-
event: E
-
listener: Events[E]