StepRecord
Auto-generated API reference for StepRecord.
Interface: StepRecord<TResult>
Defined in: durable.ts:16
Temporal-style durable execution primitive. Wraps any side-effectful
step in a runner.step(name, fn) call; the result is appended to a
StepLogStore. When the run restarts (after a crash, a deploy, or
a retry), replayed steps short-circuit to the recorded value and
only new steps execute.
Deterministic replay requires two rules from callers:
- Step names are stable across runs (ideally derived from the
business key — e.g.
search:$\{query\}— so the log stays meaningful even as code reorders). - Steps are pure from the perspective of the log — the fn does the side effect, the result is everything later steps need.
#Type Parameters
#TResult
TResult = unknown
#Properties
#attempt
attempt:
number
Defined in: durable.ts:25
#endedAt
endedAt:
string
Defined in: durable.ts:24
#error?
optionalerror?:string
Defined in: durable.ts:22
#name
name:
string
Defined in: durable.ts:19
#result?
optionalresult?:TResult
Defined in: durable.ts:21
#runId
runId:
string
Defined in: durable.ts:17
#startedAt
startedAt:
string
Defined in: durable.ts:23
#status
status:
"success"|"failure"
Defined in: durable.ts:20
#stepId
stepId:
string
Defined in: durable.ts:18