import type { CachedData, CacheConfig } from "./types.js"; export interface DiskCacheFs { readFile(path: string, encoding: BufferEncoding): Promise; writeFile(path: string, data: string, options?: { encoding?: BufferEncoding; flag?: string; }): Promise; rename(from: string, to: string): Promise; mkdir(path: string, options?: { recursive?: boolean; }): Promise; unlink(path: string): Promise; realpath(path: string): Promise; } interface DiskCacheDeps { fs: DiskCacheFs; } interface ResolveCacheDirDeps { env?: Record; homedir?: () => string; } export declare function loadFromDisk(config: Pick, deps: DiskCacheDeps): Promise | null>; export declare function persist(data: T, config: Pick, deps: DiskCacheDeps): Promise; export declare function removeFromDisk(config: Pick, deps: DiskCacheDeps): Promise; export declare function resolveCacheDir(appName: string, deps?: ResolveCacheDirDeps): string; export {};