Skip to content

Function: executeReplaceWithPromotion() ​

ts
function executeReplaceWithPromotion<TIn, THandle>(params): Promise<string>;

Defined in: runtime/flow/internal/flow-replace-and-rewind.ts:65

Promotes a .replaceWith(replacementActor, mapInput) handler by resetting step overlays and atomically recording replacement step start (SPEC.md §3.6 & §3.9).

Executes abortHook when defined or restores baseScopeCheckpoint via restoreCheckpoint, updates persisted run.inputJson with replacementInput, and sets flowCtx.activeReplacementExecutable.

Type Parameters ​

Type ParameterDefault typeDescription
TInunknownValidated flow input payload type.
THandleunknownRuntime handle type of the active isolation scope.

Parameters ​

ParameterTypeDescription
paramsReplaceWithPromotionParams<TIn, THandle>Promotion parameters and replacement executable.

Returns ​

Promise<string>

Newly allocated stepExecId for the replacement executable.

Released under the MIT License.