Skip to main content

State <TData>

Index

Properties

optionalname

name?: string

optionalonEnter

onEnter?: (context: { data: TData; eventData?: any; from: string }) => boolean | void

Type declaration

    • (context: { data: TData; eventData?: any; from: string }): boolean | void
    • Parameters

      • context: { data: TData; eventData?: any; from: string }
        • data: TData
        • optionaleventData: any
        • from: string

      Returns boolean | void

optionalonExit

onExit?: (context: { data: TData; to: string }) => boolean | void

Type declaration

    • (context: { data: TData; to: string }): boolean | void
    • Parameters

      • context: { data: TData; to: string }
        • data: TData
        • to: string

      Returns boolean | void

optionalonState

onState?: () => any

Type declaration

    • (): any
    • Returns any

optionalonUpdate

onUpdate?: (data: TData, elapsedMs: number) => any

Type declaration

    • (data: TData, elapsedMs: number): any
    • Parameters

      • data: TData
      • elapsedMs: number

      Returns any

transitions

transitions: string[]