EventEmitter <TEventMap>
Index
Constructors
constructor
Type parameters
- TEventMap: EventMap = any
Returns EventEmitter<TEventMap>
Methods
clear
Removes all listeners and pipes
Returns void
emit
Type parameters
- TEventName: string
Parameters
eventName: TEventName
event: TEventMap[TEventName]
Returns void
off
Type parameters
- TEventName: string
Parameters
eventName: TEventName
handler: Handler<TEventMap[TEventName]>
Returns void
on
Type parameters
- TEventName: string
Parameters
eventName: TEventName
handler: Handler<TEventMap[TEventName]>
Returns Subscription
once
Type parameters
- TEventName: string
Parameters
eventName: TEventName
handler: Handler<TEventMap[TEventName]>
Returns Subscription
pause
Paused event emitters do not emit events
Returns void
pipe
Replay events from this emitter to another
Parameters
emitter: EventEmitter<any>
Returns Subscription
unpause
Unpaused event emitter do emit events
Returns void
unpipe
Remove any piped emitters
Parameters
emitter: EventEmitter<any>
Returns void
Excalibur's typed event emitter, this allows events to be sent with any string to Type mapping