interface AutoCache extends CacheStats { (word: string): R; } export interface CacheStats { hits: number; misses: number; swaps: number; } declare class Cache01 implements CacheStats { readonly maxSize: number; private count; private cache0; private cache1; hits: number; misses: number; swaps: number; constructor(maxSize: number); get(key: string): R | undefined; set(key: string, value: R): this; } export declare function createCache01(size: number): Cache01; export declare function autoCache(fn: (p: string) => R, size?: number): AutoCache; export declare function extractStats(ac: AutoCache | CacheStats): CacheStats; export {}; //# sourceMappingURL=AutoCache.d.ts.map