import type { AnyFunction } from '..';
/**
 * Creates a memoized version of a function.
 * @param {T} fn - The function to memoize.
 * @returns {(...args: Parameters<T>) => ReturnType<T> | undefined} A memoized version of the input function.
 * @template T
 * @example
 * const expensiveCalculation = (n) => {
 *   console.log('Calculating...');
 *   return n * 2;
 * };
 * const memoizedCalc = memoize(expensiveCalculation);
 *
 * console.log(memoizedCalc(5)); // Logs: Calculating... 10
 * console.log(memoizedCalc(5)); // Logs: 10 (no calculation, result from cache)
 */
export declare function memoize<T extends AnyFunction>(fn: T, limit?: number): (...args: Parameters<T>) => ReturnType<T> | undefined;
