redux-thunk icon indicating copy to clipboard operation
redux-thunk copied to clipboard

Rework types to better support getting *full* dispatch type

Open EskiMojo14 opened this issue 7 months ago • 1 comments

Breaking changes:

  • Change ThunkAction signature from ThunkAction<ReturnType, State, ExtraThunkArg, BasicAction> to ThunkAction<Dispatch, State, ExtraThunkArg, ReturnType>
  • Remove action overload and union overload from middleware type
    • Dispatch must explicitly be cast to ThunkDispatch for union to be supported
  • Rework type signature for thunk overload to use this to infer Dispatch type
    • this allows other overloads to be accounted for automatically

EskiMojo14 avatar Jun 29 '24 19:06 EskiMojo14