Skip to content

Interface: FlowBranchNode<TFlowIn, TBranchOut, THandle, TBranchId> ​

Defined in: ast/flow-branch-node.ts:34

Passive AST node representing a conditional multi-way branch inside a FlowNode (.branch(id, $b => ...)).

All branch cases and the fallback otherwiseSteps produce outputs validated against outputSchema and recorded in completedStepOutputsJson under the outer id: TBranchId.

Type Parameters ​

Type ParameterDefault typeDescription
TFlowInunknownEnclosing flow input payload type.
TBranchOutunknownUnified output payload type produced by the selected branch.
THandleunknownRuntime handle type of the active isolation scope.
TBranchId extends stringstringLiteral branch step identifier string.

Properties ​

PropertyModifierTypeDescriptionDefined in
casesreadonlyreadonly FlowBranchCase<TFlowIn, THandle>[]Ordered list of conditional when branch cases evaluated in declaration order.ast/flow-branch-node.ts:47
idreadonlyTBranchIdUnique literal identifier of the branch node within the enclosing flow.ast/flow-branch-node.ts:43
otherwiseStepsreadonlyreadonly ( | FlowStepNode<unknown, unknown, THandle, string> | FlowBranchNode<unknown, unknown, THandle, string>)[]Fallback steps executed when no cases predicate matches.ast/flow-branch-node.ts:49
outputSchemareadonlyZodType<TBranchOut>Zod schema validating the output of whichever branch case executes.ast/flow-branch-node.ts:45
typereadonly"harness:flow-branch"Discriminant identifying a flow branch AST node.ast/flow-branch-node.ts:41

Released under the MIT License.