Class TransitionBase<E>Abstract

The base implementation of a FSM transition.

Type Parameters

  • E extends Event

Hierarchy

Implements

Constructors

  • Creates the transition.

    Type Parameters

    • E extends Event

    Parameters

    • srcState: OutputState

      The source state of the transition

    • tgtState: InputState

      The output state of the transition

    • Optional action: ((evt) => void)

      The action to execute when going through the transition

        • (evt): void
        • Parameters

          • evt: E

          Returns void

    • Optional guard: ((evt) => boolean)

      The guard to fulfil to execute the transition

        • (evt): boolean
        • Parameters

          • evt: E

          Returns boolean

    Returns TransitionBase<E>

Properties

action: ((evt) => void)

Type declaration

    • (evt): void
    • Parameters

      • evt: E

      Returns void

guard: ((evt) => boolean)

Type declaration

    • (evt): boolean
    • Parameters

      • evt: E

      Returns boolean

Accessors

Methods

  • Returns ReadonlySet<"input" | "auxclick" | "change" | "click" | "keydown" | "keyup" | "mousedown" | "mouseenter" | "mouseleave" | "mousemove" | "mouseout" | "mouseover" | "mouseup" | "scroll" | "touchend" | "touchmove" | "touchstart" | "wheel">

    The set of events accepted by the transition.

Generated using TypeDoc