Skip to content
1 min read · 104 words

Function: runOutputPipeline()

ts
function runOutputPipeline<C>(
  mw: Middleware<MiddlewareFn<C>>,
  ctx: C,
  label: string,
): Promise<void>;

Defined in: batteries/tools/_shared/index.ts:246

Run an output pipeline over ctx; rethrow any stage error to the caller's try/catch. A non-terminal pipeline (no next()) throws.

Type Parameters

Type Parameter
C

Parameters

ParameterTypeDescription
mwMiddleware<MiddlewareFn<C>>The Middleware instance holding the stages (a fresh .runner() is minted here).
ctxCThe mutable output context handed to each stage.
labelstringBattery name, used in the non-terminal error message.

Returns

Promise<void>