Subscribable
Provides safe access to the public interface of EventDispatcherBase.
External classes can use it to subscribe to an event without being able to dispatch it.
Type Parameters
TValueThe type of the argument passed to subscribers.
THandler extends EventHandlerTValue = EventHandlerTValueThe type of the callback function.
Extended by
SubscribableValueEvent
Constructors
constructor
public new Subscribabledispatcher: EventDispatcherBaseTValueTHandler: SubscribableTValueTHandler
Parameters
dispatcher: EventDispatcherBaseTValueTHandler
Methods
subscribe
public subscribehandler: THandler: () => void
Subscribe to the event.
Parameters
handler: THandlerThe handler to invoke when the event occurs.
unsubscribe
public unsubscribehandler: THandler: void
Unsubscribe from the event.
Parameters
handler: THandlerThe handler to unsubscribe.