Options for configuring state machine behavior.

interface KosStateMachineOptions {
    stateProperty?: string;
    trackHistory?: boolean;
    throwOnInvalid?: boolean;
}

Properties

stateProperty?: string

Property name for storing the current state.

Default

"currentState"
trackHistory?: boolean

Whether to track state history. When enabled, a stateHistory array is maintained with timestamps and events.

Default

false
throwOnInvalid?: boolean

Whether to throw errors on invalid transitions. When false, invalid transitions are logged as warnings instead.

Default

true