Skip to content

Commit

Permalink
update redux to 4.0.0, fix test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Wang Zhongliang committed Apr 18, 2018
1 parent f86bd3f commit 01df0b0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2,813 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@
"eslint-config-airbnb": "1.0.2",
"eslint-plugin-react": "^4.1.0",
"mocha": "^2.2.5",
"redux": "4.0.0-beta.2",
"redux": "~4.0.0",
"rimraf": "^2.5.2",
"typescript": "~2.6.0",
"typescript": "~2.6.2",
"typings-tester": "^0.3.1",
"webpack": "^1.12.14"
}
Expand Down
9 changes: 8 additions & 1 deletion test/typescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,17 @@ function testGetState(): ThunkResult<void> {
// typings:expect-error
dispatch({ type: 'BAZ'});
// Can dispatch another thunk action
dispatch(testGetState());
dispatch(anotherThunkAction());
};
}

function anotherThunkAction(): ThunkResult<string> {
return (dispatch, getState) => {
dispatch({ type: 'FOO' });
return 'hello';
}
}

store.dispatch({ type: 'FOO' });
// typings:expect-error
store.dispatch({ type: 'BAR' })
Expand Down
Loading

0 comments on commit 01df0b0

Please sign in to comment.