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 Parameter | Default type | Description |
|---|---|---|
TIn | unknown | Validated flow input payload type. |
THandle | unknown | Runtime handle type of the active isolation scope. |
Parameters
| Parameter | Type | Description |
|---|---|---|
params | ReplaceWithPromotionParams<TIn, THandle> | Promotion parameters and replacement executable. |
Returns
Promise<string>
Newly allocated stepExecId for the replacement executable.