import { DocumentNode } from 'graphql'; import { StoreObject, Reference } from '../../utilities'; import { DataProxy } from './types/DataProxy'; import { Cache } from './types/Cache'; export declare type Transaction = (c: ApolloCache) => void; export declare abstract class ApolloCache implements DataProxy { abstract read(query: Cache.ReadOptions): TData | null; abstract write(write: Cache.WriteOptions): Reference | undefined; abstract diff(query: Cache.DiffOptions): Cache.DiffResult; abstract watch(watch: Cache.WatchOptions): () => void; abstract reset(options?: Cache.ResetOptions): Promise; abstract evict(options: Cache.EvictOptions): boolean; abstract restore(serializedState: TSerialized): ApolloCache; abstract extract(optimistic?: boolean): TSerialized; abstract removeOptimistic(id: string): void; batch(options: Cache.BatchOptions): U; abstract performTransaction(transaction: Transaction, optimisticId?: string | null): void; recordOptimisticTransaction(transaction: Transaction, optimisticId: string): void; transformDocument(document: DocumentNode): DocumentNode; identify(object: StoreObject | Reference): string | undefined; gc(): string[]; modify(options: Cache.ModifyOptions): boolean; transformForLink(document: DocumentNode): DocumentNode; readQuery(options: Cache.ReadQueryOptions, optimistic?: boolean): QueryType | null; private getFragmentDoc; readFragment(options: Cache.ReadFragmentOptions, optimistic?: boolean): FragmentType | null; writeQuery({ id, data, ...options }: Cache.WriteQueryOptions): Reference | undefined; writeFragment({ id, data, fragment, fragmentName, ...options }: Cache.WriteFragmentOptions): Reference | undefined; updateQuery(options: Cache.UpdateQueryOptions, update: (data: TData | null) => TData | null | void): TData | null; updateFragment(options: Cache.UpdateFragmentOptions, update: (data: TData | null) => TData | null | void): TData | null; } //# sourceMappingURL=cache.d.ts.map