Interface EventFunctions<TEventData>
interface EventFunctions<TEventData extends EventData> { eventData: TEventData; clearListeners(eventNames: keyof TEventData | (
keyof TEventData)
[]): void; emit<TEventName extends string | number | symbol>( eventName: TEventName, eventArgs: TEventData[TEventName], ): Promise<void>; emitSerial<TEventName extends string | number | symbol>( eventName: TEventName, eventArgs: TEventData[TEventName], ): Promise<void>; listenerCount(eventNames: keyof TEventData | (
keyof TEventData)
[]): number; off<TEventName extends string | number | symbol>( eventNames: TEventName | TEventName[], listener: EventListener<TEventData[TEventName]>, ): void; offAny(listener: Promise<void> | EventAnyListener<EventArgs>): void; on<TEventName extends string | number | symbol>( eventNames: TEventName | TEventName[], listener: EventListener<TEventData[TEventName]>, ): EventUnsubscribeFunction; onAny(listener: EventAnyListener<EventArgs>): EventUnsubscribeFunction; once<TEventName extends string | number | symbol>( eventName: TEventName, listener: EventListener<TEventData[TEventName]>, ): EventUnsubscribeFunction;} Properties
Methods
emit
- emit<TEventName extends string | number | symbol>(
eventName: TEventName,
eventArgs: TEventData[TEventName],
): Promise<void> Type Parameters
- TEventName extends string | number | symbol
Returns Promise<void>
emitSerial
- emitSerial<TEventName extends string | number | symbol>(
eventName: TEventName,
eventArgs: TEventData[TEventName],
): Promise<void> Type Parameters
- TEventName extends string | number | symbol
Returns Promise<void>