Count of number of times this signal has been dispatched. This is incremented each time
dispatch
is called prior to invoking the handlers.
Invokes each handler function with the same parameters (including this
) with which it is
called. Handlers are invoked in the order in which they were added.
Private
handlersAdd a handler function. If dispatch
is currently be called, then the new handler will be
called before dispatch
returns.
A function that unregisters the handler.
The handler function to add.
Add a handler function. If dispatch
is currently be called, then the new handler will be
called before dispatch
returns.
A function that unregisters the handler.
Generated using TypeDoc
This class provides a simple signal dispatch mechanism. Handlers can be added, and then the
dispatch
method calls all of them.If specified, Callable should be an interface containing only a callable signature returning void. Due to limitations in TypeScript, any interface containing a callable signature will be accepted by the compiler, but the resultant signature of
dispatch
will not be correct.