EventDispatcher
class EventDispatcherT extends EventDispatcherBaseT
Dispatches a SubscribableEvent
.
Examples
Type Parameters
T
The type of the value argument to subscribers.
Constructors
constructor
public new EventDispatcherT(): EventDispatcherT
Type Parameters
Inherited fromEventDispatcherBase.constructor
Properties
subscribable
readonly public subscribable: SubscribableTEventHandlerT = ...
EventDispatcherBase.subscribable
Methods
clear
public clear(): void
Unsubscribe all subscribers from the event.
Inherited fromEventDispatcherBase.clear
dispatch
Parameters
subscribe
public subscribehandler: EventHandlerT: () => void
Subscribe to the event.
Parameters
handler: EventHandlerT
The handler to invoke when the event occurs.
EventDispatcherBase.subscribe
unsubscribe
public unsubscribehandler: EventHandlerT: void
Unsubscribe from the event.
Parameters
handler: EventHandlerT
The handler to unsubscribe.
EventDispatcherBase.unsubscribe