import {Dispatch, Action} from "../../index.d.ts"; declare const dispatch: Dispatch; const dispatchResult: Action = dispatch({type: 'TYPE'}); // thunk declare module "../../index.d.ts" { export interface Dispatch { (asyncAction: (dispatch: Dispatch, getState: () => S) => R): R; } } const dispatchThunkResult: number = dispatch(() => 42); const dispatchedTimerId: number = dispatch(d => setTimeout(() => d({type: 'TYPE'}), 1000));