类型别名 CommandParams<Resume, Update, Nodes>

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

类型参数

  • Resume = unknown
  • Update extends Record<string, unknown> = Record<string, unknown>
  • Nodes extends string = string

类型声明

  • 可选 goto?: Nodes | SendInterface<Nodes> | (Nodes | SendInterface<Nodes>)[]

    可以是以下之一

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

    要发送命令的图。支持的值有:

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

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

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

  • 可选 resume?: Resume

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

  • 可选 update?: Update | [string, unknown][]

    要应用于图状态的更新。