Skip to content

@ue-too/being / index / StateMachineSchema

Interface: StateMachineSchema<Context, EventPayloadMapping, StateNames, EventOutputMapping> ​

Defined in: schema-factory.ts:290

Complete schema definition for a state machine.

Type Parameters ​

Context ​

Context extends BaseContext = BaseContext

The context type

EventPayloadMapping ​

EventPayloadMapping = any

Mapping of event names to their payload types

StateNames ​

StateNames extends string = string

Union type of all valid state names (inferred from states array)

EventOutputMapping ​

EventOutputMapping extends Partial<Record<keyof EventPayloadMapping, unknown>> = DefaultOutputMapping<EventPayloadMapping>

Optional mapping of events to their output types

Properties ​

events ​

events: EventPayloadMapping

Defined in: schema-factory.ts:301

Mapping of event names to their payload types


initialState ​

initialState: StateNames

Defined in: schema-factory.ts:310

Initial state name


stateDefinitions ​

stateDefinitions: StateDefinition<Context, EventPayloadMapping, StateNames, EventOutputMapping>[]

Defined in: schema-factory.ts:303

Array of state definitions


states ​

states: readonly StateNames[] | StateNames[]

Defined in: schema-factory.ts:299

Array of all possible state names