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:
Ivo Stratev
2016-08-19 23:19:38 +03:00
committed by GitHub
parent 24b0b62ce0
commit f340b21d40

View File

@@ -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)
});