Type alias CommandParams<R>

CommandParams<R>: {
    goto?: string | SendInterface | (string | SendInterface)[];
    graph?: string;
    lg_name?: "Command";
    resume?: R;
    update?: Record<string, unknown> | [string, unknown][];
}

Type Parameters

  • R

Type declaration

  • Optional goto?: string | SendInterface | (string | SendInterface)[]

    Can be one of the following:

    • name of the node to navigate to next (any node that belongs to the specified graph)
    • sequence of node names to navigate to next
    • Send object (to execute a node with the input provided)
    • sequence of Send objects
  • Optional graph?: string

    Graph to send the command to. Supported values are:

    • None: the current graph (default)
    • The specific name of the graph to send the command to
    • Command.PARENT: closest parent graph (only supported when returned from a node in a subgraph)
  • Optional lg_name?: "Command"

    A discriminator field used to identify the type of object. Must be populated when serializing.

    Optional because it's not required to specify this when directly constructing a Command object.

  • Optional resume?: R

    Value to resume execution with. To be used together with interrupt.

  • Optional update?: Record<string, unknown> | [string, unknown][]

    Update to apply to the graph's state.