// Type definitions for redux-promise-middleware // Project: https://github.com/pburtchaell/redux-promise-middleware // Definitions by: ianks // Definitions: https://github.com/borisyankov/DefinitelyTyped // TypeScript Version: 2.8 import { Middleware } from 'redux'; export default function promiseMiddleware(config?: { promiseTypeSuffixes?: string[], promiseTypeDelimiter?: string }): Middleware; declare module "redux" { export interface PromiseAction extends Action { payload: Promise; } type PayloadType = PA extends PromiseAction ? R : never; export interface Dispatch { >(action: PA): Promise<{ value: PayloadType; type: string; }>; } }