Skip to content

Commit e2d846d

Browse files
committed
logSlowReducers: Make type less imprecise.
Still imprecise... but at least now it doesn't cause its callers to *lose* information.
1 parent 381fa1a commit e2d846d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils/redux.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import config from '../config';
33
import timing from './timing';
44

5-
export const logSlowReducers = (reducers: Object): Object => {
5+
export function logSlowReducers<O: Object>(reducers: O): O {
66
Object.keys(reducers).forEach((name: string) => {
77
const originalReducer = reducers[name];
88
reducers[name] = (state, action) => {
@@ -20,4 +20,4 @@ export const logSlowReducers = (reducers: Object): Object => {
2020
};
2121
});
2222
return reducers;
23-
};
23+
}

0 commit comments

Comments
 (0)