The machine to be interpreted
Interpreter options
The clock that is responsible for setting and clearing timeouts, such as delayed events and transitions.
Alias for Interpreter.prototype.start
Whether the service is started.
The machine to be interpreted
The globally unique process ID for this invocation.
The default interpreter options:
clock
uses the global setTimeout
and clearTimeout
functionslogger
uses the global console.log()
methodExecutes the actions of the given state, with that state's context
and event
.
The state whose actions will be executed
The action implementations to use
Removes a listener.
The listener to remove
Adds a context listener that is notified whenever the state context changes.
The context listener
Adds a state listener that is notified when the statechart has reached its final state.
The state listener
Adds an event listener that is notified whenever an event is sent to the running interpreter.
The event listener
Adds an event listener that is notified whenever a send
event occurs.
The event listener
Adds a listener that is notified when the machine is stopped.
The listener
Sends an event to the running interpreter to trigger a transition.
An array of events (batched) can be sent as well, which will send all batched events to the running interpreter. The listeners will be notified only once when all events are processed.
The event(s) to send
Starts the interpreter from the given state, or the initial state.
The state to start the statechart from
Stops the interpreter and unsubscribe all listeners.
This will also notify the onStop
listeners.
Generated using TypeDoc
Creates a new Interpreter instance (i.e., service) for the given machine with the provided options, if any.