import { Middleware, Action, AnyAction } from "redux"; export interface ThunkDispatch { (action: T): T; (asyncAction: ThunkAction): R; } export type ThunkAction = ( dispatch: ThunkDispatch, getState: () => S, extraArgument: E ) => R; export type ThunkMiddleware = Middleware, S, ThunkDispatch>; declare const thunk: ThunkMiddleware & { withExtraArgument(extraArgument: E): ThunkMiddleware<{}, AnyAction, E> } export default thunk;