1
- import { ThunkAction } from './src/index' ;
1
+ import { ThunkAction } from './src/index'
2
2
3
3
/**
4
4
* Globally alter the Redux `bindActionCreators` and `Dispatch` types to assume
@@ -16,27 +16,27 @@ declare module 'redux' {
16
16
* from thunk actions
17
17
*/
18
18
function bindActionCreators <
19
- TActionCreators extends ActionCreatorsMapObject < any >
19
+ ActionCreators extends ActionCreatorsMapObject < any >
20
20
> (
21
- actionCreators : TActionCreators ,
22
- dispatch : Dispatch ,
21
+ actionCreators : ActionCreators ,
22
+ dispatch : Dispatch
23
23
) : {
24
- [ TActionCreatorName in keyof TActionCreators ] : ReturnType <
25
- TActionCreators [ TActionCreatorName ]
24
+ [ ActionCreatorName in keyof ActionCreators ] : ReturnType <
25
+ ActionCreators [ ActionCreatorName ]
26
26
> extends ThunkAction < any , any , any , any >
27
27
? (
28
- ...args : Parameters < TActionCreators [ TActionCreatorName ] >
29
- ) => ReturnType < ReturnType < TActionCreators [ TActionCreatorName ] > >
30
- : TActionCreators [ TActionCreatorName ] ;
31
- } ;
28
+ ...args : Parameters < ActionCreators [ ActionCreatorName ] >
29
+ ) => ReturnType < ReturnType < ActionCreators [ ActionCreatorName ] > >
30
+ : ActionCreators [ ActionCreatorName ]
31
+ }
32
32
33
33
/*
34
34
* Overload to add thunk support to Redux's dispatch() function.
35
35
* Useful for react-redux or any other library which could use this type.
36
36
*/
37
37
export interface Dispatch < A extends Action = AnyAction > {
38
- < TReturnType = any , TState = any , TExtraThunkArg = any > (
39
- thunkAction : ThunkAction < TReturnType , TState , TExtraThunkArg , A > ,
40
- ) : TReturnType ;
38
+ < ReturnType = any , State = any , ExtraThunkArg = any > (
39
+ thunkAction : ThunkAction < ReturnType , State , ExtraThunkArg , A >
40
+ ) : ReturnType
41
41
}
42
42
}
0 commit comments