类型别名 CommandParams<R>

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

类型参数

  • R

类型声明

  • 可选 goto?: string | SendInterface | (string | SendInterface)[]

    可以是以下之一

    • 要导航到的下一个节点的名称(属于指定 graph 的任何节点)
    • 要导航到的下一个节点名称序列
    • Send 对象(用于使用提供的输入执行节点)
    • Send 对象序列
  • 可选 graph?: string

    发送命令的图。支持的值包括

    • None:当前图(默认)
    • 要发送命令的图的具体名称
    • Command.PARENT:最近的父图(仅在子图中的节点返回时支持)
  • 可选 lg_name?: "Command"

    用于识别对象类型的鉴别字段。序列化时必须填充。

    可选,因为直接构造 Command 对象时不需要指定此项。

  • 可选 resume?: R

    恢复执行的值。与 interrupt 一起使用。

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

    应用于图状态的更新。