redux-thunk
redux-thunk copied to clipboard
Rework types to better support getting *full* dispatch type
Breaking changes:
- Change ThunkAction signature from
ThunkAction<ReturnType, State, ExtraThunkArg, BasicAction>
toThunkAction<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
- Dispatch must explicitly be cast to
- Rework type signature for thunk overload to use
this
to infer Dispatch type- this allows other overloads to be accounted for automatically