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:210
The full state definition, including schemas, handlers, and optional invariants and snapshot logic.
Type declaration
given?
optional
given: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()?
optional
snap: (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.