Skip to content

@yantrix/automata v0.6.0 • Docs


Yantrix API / @yantrix/automata / TEffectMatrix

Type Alias: TEffectMatrix<ModelType, EventType, EventMetaType> ​

ts
type TEffectMatrix<ModelType, EventType, EventMetaType>: { readonly [Event in EventType]?: ReadonlyArray<TAutomataEffect<ModelType, Event, EventMetaType>> };

Maps each Event to the ordered Effects it triggers.

An Effect Matrix usually belongs to a Slice. Multiple Effect Matrices can be registered in an Effect Scheduler and are evaluated in registration order.

Type Parameters ​

• ModelType extends object

• EventType extends TAutomataBaseEventType

• EventMetaType extends { [K in EventType]: any } = Record<EventType, any>