import { Action } from 'redux'; export declare type ThunkContextAction = (dispatch: ThunkContextDispatch, getState: () => S, context: C) => R; export interface ThunkContextDispatch { (action: ThunkContextAction): R; } declare module 'redux' { interface Dispatch { (action: ThunkContextAction): R; } } export declare function reduxThunkContextMiddleware(createContext: () => C): (args: { dispatch: ThunkContextDispatch; getState: () => S; }) => (next: (action: Action | ThunkContextAction) => R) => (action: Action | ThunkContextAction) => any; export declare class ContextAction { context: C; action: ThunkContextAction; constructor(context: C, action: ThunkContextAction); }