import { DependencyList } from 'react'; export interface Options { manual?: boolean; pollingInterval?: number; onSuccess?: (d: T) => void; onError?: (e: Error) => void; } type noop = (...args: any) => void; type promiseReturn = (arg0?: P, ...args: any[]) => Promise; export interface ReturnValue { loading: boolean; error?: Error; data?: T; cancel: noop; run: promiseReturn; timer: { stop: noop; resume: noop; pause: noop; }; } /** * async request hook * @param fn async request method * @param deps deps * @param options Options * @returns */ export declare function useAsync

(fn: (...args: any[]) => Promise, deps?: DependencyList, options?: Options): ReturnValue; export {};