Type Alias Guard<D, N>

Guard<D, N>: ((params: GuardParams<D, N>) => boolean)

The type of guard function to check before the transition.

Type Parameters

  • D

    The type of the state machine definition.

  • N extends string

    The type of guard name.

Type declaration

    • (params): boolean
    • Checks if the transition is allowed.

      Parameters

      Returns boolean

      true if the transition is allowed, false otherwise.