/* @flow */
import config from '../config';
import timing from './timing';

export const logSlowReducers = (reducers: Object): Object => {
  Object.keys(reducers).forEach((name: string) => {
    const originalReducer = reducers[name];
    reducers[name] = (state, action) => {
      const startMs = Date.now();
      const result = originalReducer(state, action);
      const endMs = Date.now();
      if (endMs - startMs >= config.slowReducersThreshold) {
        timing.add({
          text: `${action.type} @ ${name}`,
          startMs,
          endMs,
        });
      }
      return result;
    };
  });
  return reducers;
};

@@ -76,21 +76,24 @@
 %0Aexport 
-const
+function
  logSlow
@@ -100,19 +100,27 @@
 Reducers
- = 
+%3CO: Object%3E
 (reducer
@@ -127,25 +127,12 @@
 s: O
-bject): Object =%3E
+): O
  %7B%0A 
@@ -623,10 +623,9 @@
 ucers;%0A%7D
-;
 %0A

Make type less imprecise.