import { Options, Result } from 'ahooks/es/useRequest/src/types';
import { SetState } from 'ahooks/lib/useSetState';
import { AxiosRequestConfig } from 'axios';
type FunctionService = (...args: any[]) => Promise<any>;
export type ReturnTypeOfUseRequest<TData = any> = ReturnType<typeof useRequest<TData>>;
export type ResourceActionOptions<P = any> = {
    resource?: string;
    resourceOf?: any;
    action?: string;
    params?: P;
    url?: string;
};
export type UseRequestService<P> = AxiosRequestConfig<P> | ResourceActionOptions<P> | FunctionService;
export type UseRequestOptions = Options<any, any> & {
    uid?: string;
};
export interface UseRequestResult<P> extends Result<P, any> {
    state: any;
    setState: SetState<{}>;
}
export declare function useRequest<P>(service: UseRequestService<P>, options?: UseRequestOptions): UseRequestResult<P>;
export {};
