InvalidStateTransitionError
Overview
Type: class
An error that is thrown when attempting to change a state without conforming to the predefined state transitions.
export class InvalidStateTransitionError extends Error {}
Also see: SimpleFiniteStateManager
Constructor
constructor(fromState: string, toState: string, stateManager?: string)
Parameters
fromState— The value of the state which is it changing from.
Type:string
Required: YestoState— The value of the state which is it changing to.
Type:string
Required: YesstateManager— The display name. Only used for debugging.
Type:string
Required: No — (default value:undefined)
Message Format
from "
fromState" to "toState" instateManager
Example
from "A" to "B" in ExampleState
Properties
fromState
The value of the state which is it changing from.
readonly fromState: string
toState
The value of the state which is it changing to.
readonly toState: string
stateManager
The display name. Only used for debugging.
readonly stateManager: string