StateStatus
Interface: StateStatus
Defined in: packages/utils/src/state.ts:18
Runtime state information tracked for an object decorated with State.
Properties
lastTransition?
optionallastTransition?:number
Defined in: packages/utils/src/state.ts:22
Timestamp (ms since epoch) of the last state transition.
state
state:
string
Defined in: packages/utils/src/state.ts:20
The current state name. Starts as "initial".
transitions
transitions:
object[]
Defined in: packages/utils/src/state.ts:24
Ordered history of completed state transitions.
duration
duration:
number
endTime
endTime:
number
exception?
optionalexception?:any
startTime
startTime:
number
step
step:
string
Methods
updateState()
updateState(
newState,exception?):void
Defined in: packages/utils/src/state.ts:31
Record a transition to newState, appending an entry to transitions.
Parameters
newState
string
The new state name.
exception?
any
Optional error that caused the transition.
Returns
void