EventDispatcherBase
A base for dispatching
Subscribable
s.
Type Parameters
-
TValueThe type of the argument passed to subscribers.
-
THandler extends EventHandler TValue = EventHandler TValueThe type of the callback function.
Extended by
-
AsyncEventDispatcher -
EventDispatcher -
FlagDispatcher -
ValueDispatcher
Constructors
constructor
Type Parameters
Properties
subscribable
readonly
public
subscribable
:
Subscribable
TValue
THandler
=
...
Methods
clear
public
clear
():
void
Unsubscribe all subscribers from the event.
subscribe
public
subscribe
handler
:
THandler
: () =>
void
Subscribe to the event.
Parameters
-
handler : THandlerThe handler to invoke when the event occurs.
unsubscribe
public
unsubscribe
handler
:
THandler
:
void
Unsubscribe from the event.
Parameters
-
handler : THandlerThe handler to unsubscribe.