@@ -10,7 +10,7 @@ interface AddTodoAction extends Action {
10
10
text : string
11
11
}
12
12
13
- const addTodo : ActionCreator < AddTodoAction > = ( text : string ) => ( {
13
+ const addTodo : ActionCreator < AddTodoAction , [ string ] > = text => ( {
14
14
type : 'ADD_TODO' ,
15
15
text
16
16
} )
@@ -19,7 +19,7 @@ const addTodoAction: AddTodoAction = addTodo('test')
19
19
20
20
type AddTodoThunk = ( dispatch : Dispatch ) => AddTodoAction
21
21
22
- const addTodoViaThunk : ActionCreator < AddTodoThunk > = ( text : string ) => (
22
+ const addTodoViaThunk : ActionCreator < AddTodoThunk > = text => (
23
23
dispatch : Dispatch
24
24
) => ( {
25
25
type : 'ADD_TODO' ,
@@ -33,8 +33,8 @@ const boundAddTodo = bindActionCreators(addTodo, dispatch)
33
33
const dispatchedAddTodoAction : AddTodoAction = boundAddTodo ( 'test' )
34
34
35
35
const boundAddTodoViaThunk = bindActionCreators <
36
- ActionCreator < AddTodoThunk > ,
37
- ActionCreator < AddTodoAction >
36
+ ActionCreator < AddTodoThunk , [ string ] > ,
37
+ ActionCreator < AddTodoAction , [ string ] >
38
38
> ( addTodoViaThunk , dispatch )
39
39
40
40
const dispatchedAddTodoViaThunkAction : AddTodoAction = boundAddTodoViaThunk (
@@ -48,11 +48,11 @@ const otherDispatchedAddTodoAction: AddTodoAction = boundActionCreators.addTodo(
48
48
)
49
49
50
50
interface M extends ActionCreatorsMapObject {
51
- addTodoViaThunk : ActionCreator < AddTodoThunk >
51
+ addTodoViaThunk : ActionCreator < AddTodoThunk , [ string ] >
52
52
}
53
53
54
54
interface N extends ActionCreatorsMapObject {
55
- addTodoViaThunk : ActionCreator < AddTodoAction >
55
+ addTodoViaThunk : ActionCreator < AddTodoAction , [ string ] >
56
56
}
57
57
58
58
const boundActionCreators2 = bindActionCreators < M , N > (
0 commit comments