Skip to content

Commit 01df0b0

Browse files
author
Wang Zhongliang
committed
update redux to 4.0.0, fix test cases
1 parent f86bd3f commit 01df0b0

File tree

3 files changed

+10
-2813
lines changed

3 files changed

+10
-2813
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@
6969
"eslint-config-airbnb": "1.0.2",
7070
"eslint-plugin-react": "^4.1.0",
7171
"mocha": "^2.2.5",
72-
"redux": "4.0.0-beta.2",
72+
"redux": "~4.0.0",
7373
"rimraf": "^2.5.2",
74-
"typescript": "~2.6.0",
74+
"typescript": "~2.6.2",
7575
"typings-tester": "^0.3.1",
7676
"webpack": "^1.12.14"
7777
}

test/typescript.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,17 @@ function testGetState(): ThunkResult<void> {
3939
// typings:expect-error
4040
dispatch({ type: 'BAZ'});
4141
// Can dispatch another thunk action
42-
dispatch(testGetState());
42+
dispatch(anotherThunkAction());
4343
};
4444
}
4545

46+
function anotherThunkAction(): ThunkResult<string> {
47+
return (dispatch, getState) => {
48+
dispatch({ type: 'FOO' });
49+
return 'hello';
50+
}
51+
}
52+
4653
store.dispatch({ type: 'FOO' });
4754
// typings:expect-error
4855
store.dispatch({ type: 'BAR' })

0 commit comments

Comments
 (0)