import { MapMap } from './map-map'; /** * @description support any arguments length, any data type arguments * do not works for self-recursive functions * unless it is wrapped when being constructed * * Example that works: * * const q = memorize((n: number) => n < 2 ? 1 : q(n - 1) + q(n - 2)); * * Example that do not works: * * let f = (n: number) => n < 2 ? 1 : f(n - 1) + f(n - 2); * f = memorize(f); * * */ export declare function memorize(f: F): F & { clear: () => void; }; export declare class MemorizePool { cache: MapMap>; get(args: IArguments): undefined | [A]; set(args: IArguments, res: any): void; getOrCalc(args: IArguments, f: () => A): A; private getLastMap; }