diff --git a/lib/flow-typed/npm/redux_v4.x.x.js b/lib/flow-typed/npm/redux_v4.x.x.js --- a/lib/flow-typed/npm/redux_v4.x.x.js +++ b/lib/flow-typed/npm/redux_v4.x.x.js @@ -14,7 +14,7 @@ declare export type DispatchAPI = (action: A) => A; - declare export type Dispatch = DispatchAPI; + declare export type Dispatch> = DispatchAPI; declare export type MiddlewareAPI> = { dispatch: D, diff --git a/web/flow-typed/npm/redux_v4.x.x.js b/web/flow-typed/npm/redux_v4.x.x.js --- a/web/flow-typed/npm/redux_v4.x.x.js +++ b/web/flow-typed/npm/redux_v4.x.x.js @@ -14,7 +14,7 @@ declare export type DispatchAPI = (action: A) => A; - declare export type Dispatch = DispatchAPI; + declare export type Dispatch> = DispatchAPI; declare export type MiddlewareAPI> = { dispatch: D, diff --git a/web/redux/tab-synchronization.js b/web/redux/tab-synchronization.js --- a/web/redux/tab-synchronization.js +++ b/web/redux/tab-synchronization.js @@ -1,13 +1,13 @@ // @flow -import type { Middleware, Store } from 'redux'; +import type { Middleware, Store, Dispatch } from 'redux'; import type { Action, AppState } from './redux-setup.js'; const WEB_REDUX_CHANNEL = new BroadcastChannel('shared-redux'); const tabSynchronizationMiddleware: Middleware = - () => next => action => { + () => (next: Dispatch) => (action: Action) => { const result = next(action); // For now the `dispatchSource` field is not included in any of the // redux actions and this causes flow to throw an error.