mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-16 11:02:11 +08:00
Fixing broken test due to object-assign type definition change
Not familiar with redux but merging and `dispatchProps` in `mergeProps` seems valid since `action` is required property of `DispatchProps` and should come from somewhere.
This commit is contained in:
@@ -268,8 +268,8 @@ connect(mapStateToProps3)(TodoApp);
|
||||
// return { todos: state.todos };
|
||||
//}
|
||||
|
||||
function mergeProps(stateProps: TodoState, dispatchProps: DispatchProps, ownProps: TodoProps): DispatchProps & TodoState {
|
||||
return objectAssign({}, ownProps, {
|
||||
function mergeProps(stateProps: TodoState, dispatchProps: DispatchProps, ownProps: TodoProps): DispatchProps & TodoState & TodoProps {
|
||||
return objectAssign({}, ownProps, dispatchProps, {
|
||||
todos: stateProps.todos[ownProps.userId],
|
||||
addTodo: (text: string) => dispatchProps.addTodo(ownProps.userId, text)
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user