123456789101112131415161718192021222324252627282930313233343536373839404142 |
- import { ThunkAction } from './src/index'
- declare module 'redux' {
-
- function bindActionCreators<
- ActionCreators extends ActionCreatorsMapObject<any>
- >(
- actionCreators: ActionCreators,
- dispatch: Dispatch
- ): {
- [ActionCreatorName in keyof ActionCreators]: ReturnType<
- ActionCreators[ActionCreatorName]
- > extends ThunkAction<any, any, any, any>
- ? (
- ...args: Parameters<ActionCreators[ActionCreatorName]>
- ) => ReturnType<ReturnType<ActionCreators[ActionCreatorName]>>
- : ActionCreators[ActionCreatorName]
- }
-
- export interface Dispatch<A extends Action = AnyAction> {
- <ReturnType = any, State = any, ExtraThunkArg = any>(
- thunkAction: ThunkAction<ReturnType, State, ExtraThunkArg, A>
- ): ReturnType
- }
- }
|