Skip to content

Chain

Chain<TJobId, TChainTypeName, TInput, TOutput> = ChainFields<TJobId, TChainTypeName, TInput> & { status: "running"; } | CompletedChainFields<TOutput>

Defined in: packages/core/src/entities/chain.types.ts:14

A chain. Discriminated union on Chain.status | status.

A chain is identified by the ID of its head job, which also carries the chain’s status.

TJobId

The job ID type

TChainTypeName

The chain type name literal (matches the entry job type name)

TInput

The chain’s input payload type (from the entry job)

TOutput

The chain’s output type (from the final job when completed)