declare module "redux" { interface Action { type: T; } interface ActionFunction { (dispatch: Dispatch, getState: () => S): void; } interface ActionCreator { (...args: any[]): A | ActionFunction; } interface ActionCreators { [key: string]: ActionCreator; } interface Reducer { (state: S, action: A): S; } interface Reducers { [key: string]: Reducer; } interface Dispatch { (action: A): A; } interface StoreMethods { dispatch: Dispatch; getState(): S; } interface MiddlewareArg { dispatch: Dispatch; getState: () => S; } interface Middleware { // TODO @spanferov Write proper types (obj: MiddlewareArg): Function; } interface Store { dispatch: Dispatch; getReducer(): Reducer; replaceReducer(nextReducer: Reducer): void; getState(): S; // TODO @spanferov Write proper types subscribe(listener: Function): Function; } interface StoreCreator { (reducer: Reducer, initialState?: S): Store; } export function createStore(reducer: Reducer, initialState?: S): Store; export function bindActionCreators(actionCreators: ActionCreators, dispatch: Dispatch): ActionCreators; export function combineReducers(reducers: Reducers): Reducer; export function applyMiddleware(...middleware: Middleware[]): (createStore: StoreCreator) => StoreCreator; export function compose(...functions: Function[]): Function; }