import type { DocumentNode, OperationVariables, TypedDocumentNode } from "../../core/index.js";
import type { QueryReference } from "../cache/QueryReference.js";
import type { LoadableQueryHookOptions } from "../types/types.js";
import type { FetchMoreFunction, RefetchFunction } from "./useSuspenseQuery.js";
import type { DeepPartial, OnlyRequiredProperties } from "../../utilities/index.js";
export type LoadQueryFunction<TVariables extends OperationVariables> = (...args: [TVariables] extends [never] ? [] : {} extends OnlyRequiredProperties<TVariables> ? [variables?: TVariables] : [variables: TVariables]) => void;
type ResetFunction = () => void;
export type UseLoadableQueryResult<TData = unknown, TVariables extends OperationVariables = OperationVariables> = [
    LoadQueryFunction<TVariables>,
    QueryReference<TData, TVariables> | null,
    {
        fetchMore: FetchMoreFunction<TData, TVariables>;
        refetch: RefetchFunction<TData, TVariables>;
        reset: ResetFunction;
    }
];
export declare function useLoadableQuery<TData, TVariables extends OperationVariables, TOptions extends LoadableQueryHookOptions>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options?: LoadableQueryHookOptions & TOptions): UseLoadableQueryResult<TOptions["errorPolicy"] extends "ignore" | "all" ? TOptions["returnPartialData"] extends true ? DeepPartial<TData> | undefined : TData | undefined : TOptions["returnPartialData"] extends true ? DeepPartial<TData> : TData, TVariables>;
export declare function useLoadableQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: LoadableQueryHookOptions & {
    returnPartialData: true;
    errorPolicy: "ignore" | "all";
}): UseLoadableQueryResult<DeepPartial<TData> | undefined, TVariables>;
export declare function useLoadableQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: LoadableQueryHookOptions & {
    errorPolicy: "ignore" | "all";
}): UseLoadableQueryResult<TData | undefined, TVariables>;
export declare function useLoadableQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options: LoadableQueryHookOptions & {
    returnPartialData: true;
}): UseLoadableQueryResult<DeepPartial<TData>, TVariables>;
export declare function useLoadableQuery<TData = unknown, TVariables extends OperationVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options?: LoadableQueryHookOptions): UseLoadableQueryResult<TData, TVariables>;
export {};
//# sourceMappingURL=useLoadableQuery.d.ts.map