export interface MemoizeOptions unknown> { /** * Function to derive the cache key from arguments. * Defaults to using the first argument as key. */ resolver?: (...args: Parameters) => unknown; /** * Maximum number of results to cache. * When exceeded, least recently used entries are removed. * Defaults to Infinity (no limit). */ maxSize?: number; } export interface MemoizedFunction unknown> { (...args: Parameters): ReturnType; /** The cache map */ cache: Map>; /** Clear the cache */ clear: () => void; } /** * Create a memoized function that caches results based on arguments. * * @param fn - The function to memoize * @param options - Memoization options * @returns Memoized function with cache property * * @example * const memoized = memoizeFast(expensiveComputation) * memoized(1) // computed * memoized(1) // cached * * @example * // Custom resolver for multiple arguments * const memoized = memoizeFast(compute, { * resolver: (a, b) => `${a}-${b}` * }) * * @example * // With LRU cache limit * const memoized = memoizeFast(fetchUser, { maxSize: 100 }) */ export declare function memoizeFast unknown>(fn: T, options?: MemoizeOptions): MemoizedFunction; //# sourceMappingURL=memoize.d.ts.map