Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/core / / runWithPauseResume

Function: runWithPauseResume()

ts
function runWithPauseResume<R>(value, fn): Promise<R>;

Defined in: packages/core/src/channels/pause.ts:63

Internal

Run fn inside a scope where the next pause(...) call returns the supplied value instead of throwing a fresh PauseSignal.

This helper is the contract between the runtime and pause(...). Consumers of pause(...) never call it directly — only the workflow engine wires it up around the resumed node body.

Type Parameters

Type Parameter
R

Parameters

ParameterType
valueunknown
fn() => R | Promise&lt;R&gt;

Returns

Promise&lt;R&gt;