import { DocumentNode } from 'graphql'; interface FragmentDefinition = Record> { document: DocumentNode; name: string; __data?: TData; __variables?: TVars; } declare function fragment = Record>(strings: TemplateStringsArray, ...values: string[]): FragmentDefinition; declare function getFragment = Record>(def: FragmentDefinition): DocumentNode; declare function spread = Record>(def: FragmentDefinition): string; declare function compose(...defs: FragmentDefinition[]): DocumentNode; type FragmentKey = Readonly>; /** Inline typed fragment with optional phantom type params */ interface TypedDoc { __resultType?: unknown; __variablesType?: Record; } declare function useFragment(_fragment: FragmentDefinition | TypedDoc, data: TData | null | undefined): TData | null; declare function useFragment(_fragment: FragmentDefinition | TypedDoc, data: FragmentKey | null | undefined): TData | null; export { compose, fragment, getFragment, spread, useFragment }; export type { FragmentDefinition };