import CachePolicy from 'http-cache-semantics'; export interface FetchacheCacheEntry { policy: CachePolicy.CachePolicyObject; body: string; } type FetchFn = (input: URL | RequestInfo, init: RequestInit, ...rest: any[]) => Promise; export interface FetchacheOptions { fetch: FetchFn; Request: typeof Request; Response: typeof Response; cache: KeyValueCache; } export declare function fetchFactory({ fetch, Response, cache }: FetchacheOptions): FetchFn; export interface KeyValueCacheSetOptions { /** * Specified in **seconds**, the time-to-live (TTL) value limits the lifespan * of the data being stored in the cache. */ ttl?: number | null; } export interface KeyValueCache { get(key: string): Promise; set(key: string, value: V, options?: KeyValueCacheSetOptions): Promise; delete(key: string): Promise; } export {};