export interface FetchOpts<T> {
    start?: () => void;
    end?: () => void;
    defaultValue?: T | (() => T);
    deps?: any[] | undefined;
    condition?: () => boolean;
    onSuccess?: (data: T) => void;
    onError?: (err: any) => void;
}
export declare function useFetch<T = any>(fetcher: () => Promise<T>, opts?: FetchOpts<T> | any[] | undefined | null): {
    data: T | undefined;
    isLoading: boolean;
    error: any;
    setData: import("react").Dispatch<import("react").SetStateAction<T | undefined>>;
    refetch: () => Promise<void>;
};
export declare function useFetchOnce<T>(fetcher: () => Promise<T>, opts?: FetchOpts<T> | any[] | undefined | null): {
    data: T | undefined;
    isLoading: boolean;
    error: any;
    setData: import("react").Dispatch<import("react").SetStateAction<T | undefined>>;
    refetch: () => Promise<void>;
};
//# sourceMappingURL=useFetch.d.ts.map