Skip to content

Function: executeLoop() ​

ts
function executeLoop<TIn, TOut, THandle>(
   node, 
   input, 
   ctx
): Promise<TOut>;

Defined in: runtime/loop/execute-loop.ts:23

Executes a passive LoopNode across .act() -> .evaluate() iterations up to maxIterations (SPEC.md §3.8).

Sequences state initialization, iteration execution (runLoopIterationsUntilAccepted), output validation, and childOutcomeSink projection (projectLoopChildOutcomeSink) at one uniform level of abstraction (Rule 3.1).

Type Parameters ​

Type ParameterDefault typeDescription
TInunknownValidated loop input payload type.
TOutunknownValidated loop output payload type.
THandleunknownRuntime handle type of the active isolation scope.

Parameters ​

ParameterTypeDescription
nodeLoopNode<TIn, TOut, THandle>Passive LoopNode AST definition.
inputTInRaw or pre-mapped loop input payload.
ctxStepExecutionContext<THandle>Active step execution context.

Returns ​

Promise<TOut>

Schema-validated loop output payload from returnOutputFromStepId.

Released under the MIT License.