import { FetchStatus } from "./constants";
type CompleteFetch<T> = {
    status: FetchStatus.COMPLETE;
    data: T;
    error: null;
};
type LoadingFetch = {
    status: FetchStatus.LOADING;
    data: null;
    error: null;
};
type ErrorFetch<T> = {
    status: FetchStatus.ERROR;
    data: null;
    error: T;
};
type AnswerFetch<T, K> = CompleteFetch<T> | LoadingFetch | ErrorFetch<K>;
export declare function useFetch<T, K = unknown>(fetch: () => Promise<T>, initialValue?: T | null): AnswerFetch<T, K>;
export declare function useFetchUrl<T, K = unknown>(url: string, initialValue?: T | null): AnswerFetch<T, K>;
export {};
