Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CmdHelper<S, A>

Type parameters

  • S

  • A

Hierarchy

  • CmdHelper

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

none

none: Sub<any>[] = Cmd.none

setState

setState: function

Type declaration

    • (s: S): void
    • Parameters

      • s: S

      Returns void

Methods

addFn

  • addFn<Arg, T>(task?: undefined | function, succeedAction?: ActionType<T, S, A>, failedAction?: ActionType<Error, S, A>): void
  • Type parameters

    • Arg

    • T

    Parameters

    • Optional task: undefined | function
    • Optional succeedAction: ActionType<T, S, A>
    • Optional failedAction: ActionType<Error, S, A>

    Returns void

addPromise

  • addPromise<Arg, T>(task: function, args: Arg, succeedAction?: ActionType<T, S, A>, failedAction?: ActionType<Error, S, A>): void
  • addPromise<Arg, T>(task: function, succeedAction?: ActionType<T, S, A>, failedAction?: ActionType<Error, S, A>): void
  • Type parameters

    • Arg

    • T

    Parameters

    • task: function
        • (arg: Arg): Promise<T>
        • Parameters

          • arg: Arg

          Returns Promise<T>

    • args: Arg
    • Optional succeedAction: ActionType<T, S, A>
    • Optional failedAction: ActionType<Error, S, A>

    Returns void

  • Type parameters

    • Arg

    • T

    Parameters

    • task: function
        • (): Promise<T>
        • Returns Promise<T>

    • Optional succeedAction: ActionType<T, S, A>
    • Optional failedAction: ActionType<Error, S, A>

    Returns void

addSub

  • addSub(...subs: Sub<A>[]): void

map

Generated using TypeDoc