import type { Fn, MaybePromise } from "@thi.ng/api"; import type { MapLike } from "./api.js"; /** * Optimized memoization for single arg functions. * * @remarks * If the function expects args other than strings or numbers, you MUST provide * a `Map` implementation which supports value (rather than object) equality, * e.g. one of those provided by * [`thi.ng/associative`](https://thi.ng/associative). Using a native `Map` type * here will lead to memory leaks! * * Also see {@link memoizeO}, {@link memoizeJ}, {@link memoize}. * * @param fn - * @param cache - */ export declare const memoize1: (fn: Fn, cache?: MapLike) => (x: A) => B; /** * Async version of {@link memoize1}. * * @param fn * @param cache */ export declare const memoizeAsync1: (fn: Fn>, cache?: MapLike) => (x: A) => Promise; //# sourceMappingURL=memoize1.d.ts.map