import type { ApolloClient, DocumentNode, OperationVariables, TypedDocumentNode } from "@apollo/client";
import type { MissingTree, Reference, StoreObject } from "@apollo/client/cache";
import type { FragmentType, MaybeMasked } from "@apollo/client/masking";
import type { DeepPartial } from "@apollo/client/utilities";
import type { NoInfer } from "@apollo/client/utilities/internal";
export declare namespace useFragment {
    interface Options<TData, TVariables> {
        /**
         * A GraphQL document created using the `gql` template string tag from
         * `graphql-tag` with one or more fragments which will be used to determine
         * the shape of data to read. If you provide more than one fragment in this
         * document then you must also specify `fragmentName` to select a single.
         */
        fragment: DocumentNode | TypedDocumentNode<TData, TVariables>;
        /**
         * The name of the fragment in your GraphQL document to be used. If you do
         * not provide a `fragmentName` and there is only one fragment in your
         * `fragment` document then that fragment will be used.
         */
        fragmentName?: string;
        /**
         * Any variables that the GraphQL query may depend on.
         */
        variables?: NoInfer<TVariables>;
        from: StoreObject | Reference | FragmentType<NoInfer<TData>> | string | null;
        /**
         * Whether to read from optimistic or non-optimistic cache data. If
         * this named option is provided, the optimistic parameter of the
         * readQuery method can be omitted.
         *
         * @defaultValue true
         */
        optimistic?: boolean;
        /**
         * The instance of `ApolloClient` to use to look up the fragment.
         *
         * By default, the instance that's passed down via context is used, but you
         * can provide a different instance here.
         *
         * @docGroup 1. Operation options
         */
        client?: ApolloClient;
    }
    type Result<TData> = {
        data: MaybeMasked<TData>;
        complete: true;
        missing?: never;
    } | {
        data: DeepPartial<MaybeMasked<TData>>;
        complete: false;
        missing?: MissingTree;
    };
}
export declare function useFragment<TData = unknown, TVariables extends OperationVariables = OperationVariables>(options: useFragment.Options<TData, TVariables>): useFragment.Result<TData>;
//# sourceMappingURL=useFragment.d.ts.map
