import { KeyedMutator } from 'swr';
export interface FetchingError extends Error {
    status?: number;
    responseData?: any;
}
export interface UseGetDataResponse<T> {
    data: T | null;
    isLoading: boolean;
    total: number;
    headers: Headers;
    error: FetchingError | undefined;
    mutate: KeyedMutator<T>;
    status: number;
    timestamp: number;
    isError: boolean;
    isRefetching: boolean;
    /**
     * The length of the RETRIEVED data array (not total). This is useful for pagination or displaying the number of items. Only working with arrays.
     * @type {number}
     */
    length: number;
    /**
     * Whether the request is currently being validated. This is useful for showing loading indicators or disabling buttons while the request is in progress. (When you focus the page will check if the data is still valid)
     * @type {boolean}
     */
    isValidating: boolean;
}
type Options = {
    customFetcher?: (url: string) => Promise<any>;
};
export declare const useGetData: <T>(url: string, options?: Options) => UseGetDataResponse<T>;
export {};
//# sourceMappingURL=use-get-data.d.ts.map