Skip to content

@yantrix/automata v0.5.2 • Docs


Yantrix API / @yantrix/automata / IAutomataExtendedStateContainer

Interface: IAutomataExtendedStateContainer<StateType, ContextType> ​

Interface for an Automata extended event container.

Template ​

The type of the event.

Template ​

The type of the event metadata.

Extends ​

Extended by ​

Type Parameters ​

• StateType extends TAutomataBaseStateType

• ContextType extends { [K in StateType]: any }

Properties ​

setStateValidator() ​

ts
setStateValidator: (stateValidator?) => this;

Sets the state validator function.

Parameters ​

• stateValidator?: TValidator<StateType>

The validator function for the state.

Returns ​

this

The current instance.

Inherited from ​

IAutomataStateContainer.setStateValidator


validateState ​

ts
validateState: TValidator<StateType>;

Validator function for the state.

Inherited from ​

IAutomataStateContainer.validateState