AsyncEventDispatcher
class AsyncEventDispatcherT extends EventDispatcherBaseTAsyncEventHandlerT
Dispatches an asynchronous SubscribableEvent.
The dispatch method returns a promise that resolves when all the
handlers resolve.
Examples
Type Parameters
TThe type of the argument passed to subscribers.
Constructors
constructor
public new AsyncEventDispatcherT(): AsyncEventDispatcherT
Type Parameters
Inherited fromEventDispatcherBase.constructorProperties
subscribable
readonly public subscribable: SubscribableTAsyncEventHandlerT = ...
EventDispatcherBase.subscribableMethods
clear
public clear(): void
Unsubscribe all subscribers from the event.
Inherited fromEventDispatcherBase.cleardispatch
Parameters
subscribe
public subscribehandler: AsyncEventHandlerT: () => void
Subscribe to the event.
Parameters
handler: AsyncEventHandlerTThe handler to invoke when the event occurs.
EventDispatcherBase.subscribeunsubscribe
public unsubscribehandler: AsyncEventHandlerT: void
Unsubscribe from the event.
Parameters
handler: AsyncEventHandlerTThe handler to unsubscribe.
EventDispatcherBase.unsubscribe