Represents the specified event types or the full event objects, as well as the built in event types and/or objects.
Represents the specified events and the built-in internal events.
The string or object representing the state value relative to the parent state node.
"pending"
.{ success: "someChildState" }
.Returns an event type that represents an implicit event that
is sent after the specified delay
.
The delay in milliseconds
The state node ID where this event is handled
Invokes (spawns) a child service, as a separate interpreted machine.
The string service to invoke, or a config object:
src
- The source (URL) of the machine definition to invokeforward
- Whether events sent to this machine are sent (forwarded) to the
invoked machine.The expression function to evaluate which will be logged. Takes in 2 arguments:
ctx
- the current state contextevent
- the event that caused this action to be executed.The label to give to the logged expression.
Raises an event. This places the event in the internal event queue, so that the event is immediately consumed by the machine in the current step.
Sends an event. This returns an action that will be read by an interpreter to send the event in the next step, after the current step is finished executing.
The event to send.
Options to pass into the send event:
id
- The unique send event identifier (used with cancel()
).delay
- The number of milliseconds to delay the sending of the event.target
- The target of this event (by default, the machine the event was sent from).Starts an activity.
The activity to start.
Stops an activity.
The activity to stop.
Updates the current context of the machine.
An object that represents the partial context to update.
Cancels an in-flight send(...)
action. A canceled sent action will not
be executed, nor will its event be sent, unless it has already been sent
(e.g., if cancel(...)
is called after the send(...)
action's delay
).
The id
of the send(...)
action to cancel.
Returns an event that represents that a final state node has been reached in the parent state node.
The final state node's parent state node id
The data to pass into the event
Returns an event that represents that an invoked service has terminated.
An invoked service is terminated when it has reached a top-level final state node, but not when it is canceled.
The final state node ID
The data to pass into the event
Retrieves a value at the given path via the nested accessor prop.
The deep path to the prop of the desired value
Retrieves a value at the given path.
The deep path to the prop of the desired value
Sends an event to this machine's parent machine.
The event to send to the parent machine.
Options to pass into the send event.
Generated using TypeDoc
The specified string event types or the specified event objects.