import { DocumentNode } from 'graphql'; import { DataProxy, Cache } from './types'; export declare type Transaction = (c: ApolloCache) => void; export declare abstract class ApolloCache implements DataProxy { abstract read(query: Cache.ReadOptions): T | null; abstract write(write: Cache.WriteOptions): void; abstract diff(query: Cache.DiffOptions): Cache.DiffResult; abstract watch(watch: Cache.WatchOptions): () => void; abstract evict(query: Cache.EvictOptions): Cache.EvictionResult; abstract reset(): Promise; abstract restore(serializedState: TSerialized): ApolloCache; abstract extract(optimistic?: boolean): TSerialized; abstract removeOptimistic(id: string): void; abstract performTransaction(transaction: Transaction): void; abstract recordOptimisticTransaction(transaction: Transaction, id: string): void; transformDocument(document: DocumentNode): DocumentNode; transformForLink(document: DocumentNode): DocumentNode; readQuery(options: DataProxy.Query, optimistic?: boolean): QueryType | null; readFragment(options: DataProxy.Fragment, optimistic?: boolean): FragmentType | null; writeQuery(options: Cache.WriteQueryOptions): void; writeFragment(options: Cache.WriteFragmentOptions): void; writeData({ id, data, }: Cache.WriteDataOptions): void; } //# sourceMappingURL=cache.d.ts.map