/**
 * Request Deduplication
 *
 * Prevents duplicate concurrent GET requests by sharing in-flight requests.
 * Only deduplicates GET requests - POST/PUT/DELETE are never deduplicated.
 */
export interface DeduplicationOptions {
    /** TTL for cache entries in milliseconds (default: 100ms) */
    ttl?: number;
}
/**
 * Create a request deduplication cache.
 *
 * Concurrent identical GET requests share a single network request.
 * Results are cached briefly to handle rapid re-renders.
 *
 * @example
 * ```ts
 * const dedup = createDeduplicationCache({ ttl: 100 });
 *
 * // These will share one network request
 * const [result1, result2] = await Promise.all([
 *   dedup.dedupe('/api/events', () => fetch('/api/events')),
 *   dedup.dedupe('/api/events', () => fetch('/api/events')),
 * ]);
 * ```
 */
export declare function createDeduplicationCache(options?: DeduplicationOptions): {
    getCacheKey: (method: string, url: string, params?: Record<string, unknown>) => string;
    dedupe: <T>(key: string, fetcher: () => Promise<T>) => Promise<T>;
    clear: () => void;
    size: () => number;
};
export type DeduplicationCache = ReturnType<typeof createDeduplicationCache>;
