import { GetCacheKey } from './cache-key.js'; declare const cacheStateKey = "__CACHEDTS__state"; type CacheState = Required & { origApi: TApi; }>; type Cached = TApi & { [cacheStateKey]: CacheState; }; type AnyFunction = (...args: any[]) => T; type CacheResult = { value: unknown; cachedAt: number; }; type Cache = Map>; type CacheSettings = { enabled?: boolean; /** Time to live in milliseconds */ ttl?: number; /** Maximum number of items to keep in the cache per function */ maxSize?: number; }; type CacheOptions = { cache?: Cache; debug?: boolean; settings?: CacheSettings; overrides?: { [fnName in keyof TApi]?: CacheSettings & { getCacheKey?: TApi[fnName] extends AnyFunction ? (...args: Parameters) => string | symbol | undefined : never; }; }; /** Customize the default cache key computation. * Falls back to the default behavior when `undefined` is returned. */ getCacheKey?: GetCacheKey; }; declare function cached(api: TApi, opts?: CacheOptions): Cached; export { type AnyFunction as A, type Cache as C, type CacheOptions as a, type CacheResult as b, type CacheSettings as c, cached as d, type Cached as e, type CacheState as f, cacheStateKey as g };