import { ICache } from "./cache"; export interface MemoizeOptions { /** * Time-To-Live (TTL) in milliseconds for a cache entry. */ ttl?: number; /** * Custom cache instance that implements ICache. * Defaults to an in-memory cache if not provided. */ cache?: ICache; /** * Custom key resolver function to generate cache keys from arguments. * Defaults to using JSON.stringify(...args). */ keyResolver?: (...args: unknown[]) => string; } /** * Wraps a function with memoization capabilities. * Supports both synchronous and asynchronous (Promise‑returning) functions. * * @param fn The function to memoize. * @param options Optional configuration for TTL, cache instance, and key resolver. * @returns A memoized version of the function. */ export declare function memoize(fn: (...args: A) => R, options?: MemoizeOptions): (...args: A) => R;