Interface Transition<E>

The concept of FSM transition.

interface Transition {
    target: InputState;
    accept(event): event is E;
    acceptVisitor(visitor): void;
    execute(event): undefined | InputState;
    getAcceptedEvents(): ReadonlySet<"input" | "auxclick" | "change" | "click" | "keydown" | "keyup" | "mousedown" | "mouseenter" | "mouseleave" | "mousemove" | "mouseout" | "mouseover" | "mouseup" | "scroll" | "touchend" | "touchmove" | "touchstart" | "wheel">;
    guard(event): boolean;
    uninstall(): void;
}

Type Parameters

  • E extends Event

Implemented by

Properties

target: InputState

The target state of the transition

Methods

  • Executes the transition.

    Parameters

    • event: Event

      The event to process.

    Returns undefined | InputState

    The potential output state.

    Throws

    CancelFSMException If the execution cancels the FSM execution.

  • 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