Methods
- emit<TEventName>(eventName: TEventName, event: TEventMap[TEventName]): void
- emit(eventName: string, event?: any): void
Type parameters
Parameters
eventName: TEventName
event: TEventMap[TEventName]
Returns void
- off<TEventName>(eventName: TEventName, handler: Handler<TEventMap[TEventName]>): void
- off(eventName: string, handler: Handler<unknown>): void
- off(eventName: string): void
Type parameters
Parameters
eventName: TEventName
handler: Handler<TEventMap[TEventName]>
Returns void
Type parameters
Parameters
eventName: TEventName
handler: Handler<TEventMap[TEventName]>
Type parameters
Parameters
eventName: TEventName
handler: Handler<TEventMap[TEventName]>
Excalibur's typed event emitter, this allows events to be sent with any string to Type mapping