Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Instance

Represents an instance of a state machine model at runtime; contains the active state configuration and manages transactions. There can be many seperate state machine instances using a common model.

Hierarchy

Index

Constructors

constructor

  • Creates a new state machine instance conforming to a particular state machine model.

    Parameters

    • name: string

      The name of the state machine instance.

    • root: State

      The root state of the state machine instance.

    Returns Instance

Properties

Readonly [Symbol.toStringTag]

[Symbol.toStringTag]: string

Readonly name

name: string

Readonly root

root: State

Readonly size

size: number

Static Readonly [Symbol.species]

[Symbol.species]: MapConstructor

Methods

[Symbol.iterator]

  • [Symbol.iterator](): IterableIterator<[Region, State]>
  • Returns an iterable of entries in the map.

    Returns IterableIterator<[Region, State]>

clear

  • clear(): void
  • Returns void

delete

  • delete(key: Region): boolean
  • Parameters

    Returns boolean

entries

  • Returns an iterable of key, value pairs for every entry in the map.

    Returns IterableIterator<[Region, State]>

evaluate

  • evaluate(trigger: any): boolean
  • Evaluates a trigger event to see if it causes a state transition.

    Parameters

    • trigger: any

      The trigger event to evaluate.

    Returns boolean

    Returns true if the trigger event caused a change in the active state configuration or was deferred.

forEach

  • Parameters

    Returns void

get

  • Parameters

    Returns undefined | State

has

  • Parameters

    Returns boolean

keys

  • keys(): IterableIterator<Region>
  • Returns an iterable of keys in the map

    Returns IterableIterator<Region>

set

  • Parameters

    Returns Instance

toString

  • toString(): string
  • Returns the name of the state machine instance.

    Returns string

    Returns the name of the state machine instance.

values

  • values(): IterableIterator<State>
  • Returns an iterable of values in the map

    Returns IterableIterator<State>

Generated using TypeDoc