State
@rotorsoft/act-root / act/src / State
Type Alias: State<S, E, A>
State<
S,E,A> =StateSchemas<S,E,A> &object
Defined in: libs/act/src/types/action.ts:221
The full state definition, including schemas, handlers, and optional invariants and snapshot logic.
Type Declaration
given?
optionalgiven:GivenHandlers<S,A>
init()
init: () =>
Readonly<S>
Returns
Readonly<S>
name
name:
string
on
on:
ActionHandlers<S,E,A>
patch
patch:
PatchHandlers<S,E>
snap()?
optionalsnap: (snapshot) =>boolean
Parameters
snapshot
Snapshot<S, E>
Returns
boolean
Type Parameters
S
S extends Schema
State schema.
E
E extends Schemas
Event schemas.
A
A extends Schemas
Action schemas.