Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ThunkDispatch<State, ExtraThunkArg, BasicAction>

Type Parameters

  • State

    The redux state

  • ExtraThunkArg

    The extra argument passed to the inner function of thunks (if specified when setting up the Thunk middleware)

  • BasicAction extends Action

    The (non-thunk) actions that can be dispatched.

Hierarchy

  • ThunkDispatch

Callable

  • ThunkDispatch<ReturnType>(thunkAction: ThunkAction<ReturnType, State, ExtraThunkArg, BasicAction>): ReturnType
  • ThunkDispatch<Action>(action: Action): Action
  • ThunkDispatch<ReturnType, Action>(action: Action | ThunkAction<ReturnType, State, ExtraThunkArg, BasicAction>): ReturnType | Action
  • Accepts a thunk function, runs it, and returns whatever the thunk itself returns

    Type Parameters

    • ReturnType

    Parameters

    • thunkAction: ThunkAction<ReturnType, State, ExtraThunkArg, BasicAction>

    Returns ReturnType

  • Accepts a standard action object, and returns that action object

    Type Parameters

    • Action extends Action<any, Action>

    Parameters

    • action: Action

    Returns Action

  • A union of the other two overloads for TS inference purposes

    Type Parameters

    • ReturnType

    • Action extends Action<any, Action>

    Parameters

    • action: Action | ThunkAction<ReturnType, State, ExtraThunkArg, BasicAction>

    Returns ReturnType | Action

Generated using TypeDoc