Skip to content

Function: createInterruptEdgeBuilder() ​

ts
function createInterruptEdgeBuilder<TIn, TPayload, THandle, TCustomMetrics, TAbortMeta>(interrupt): InterruptEdgeBuilder<TIn, TPayload, THandle, TCustomMetrics, TAbortMeta>;

Defined in: builders/create-interrupt-edge-builder.ts:23

Creates a fluent InterruptEdgeBuilder for .onInterrupt(interrupt, $i => ...).

Extracts the target InterruptNode and returns an immutable builder supporting .adjudicateWith(), .ask(), and .onAbort().replaceWith() resolution strategies.

Type Parameters ​

Type ParameterDefault typeDescription
TInunknownEnclosing step input payload type.
TPayloadunknownValidated interrupt payload type.
THandleunknownIsolation scope handle type.
TCustomMetrics extends Record<string, unknown>Record<string, unknown>Custom step telemetry metrics type.
TAbortMeta extends Record<string, unknown>Record<string, unknown>Abort hook metadata type.

Parameters ​

ParameterTypeDescription
interruptMaybeBuilder<InterruptNode<TPayload>>Target interrupt AST node or builder.

Returns ​

InterruptEdgeBuilder<TIn, TPayload, THandle, TCustomMetrics, TAbortMeta>

Frozen interrupt edge builder.

Released under the MIT License.