Skip to main content

Invariant

@rotorsoft/act-root


@rotorsoft/act-root / act/src / Invariant

Type Alias: Invariant<TState, TActor>

Invariant<TState, TActor> = object

Defined in: libs/act/src/types/action.ts:320

An invariant is a condition that must always hold true for a state.

Type Parametersโ€‹

TStateโ€‹

TState extends Schema

State schema.

TActorโ€‹

TActor extends Actor = Actor

Actor type extending base Actor.

Propertiesโ€‹

descriptionโ€‹

description: string

Defined in: libs/act/src/types/action.ts:321


validโ€‹

valid: (state, actor?) => boolean

Defined in: libs/act/src/types/action.ts:322

Parametersโ€‹

stateโ€‹

Readonly<TState>

actor?โ€‹

TActor

Returnsโ€‹

boolean