UNPKG

@alexaegis/common

Version:
13 lines 665 B
import { Fn } from './fn.type.js'; import { MemoizeOptions } from './memoize.function.options.js'; /** * By default the cache does not start growing, the limit is infinite. * To set otherwise, use the options object. * * @param fn to be memoized * @param rawOptions options to customize cache behavior * @returns the memoized version of the function that will either return a cached value * or call the original function when one does not exist. */ export declare const memoize: <F extends (...args: never) => unknown, T = unknown>(fn: F, rawOptions?: MemoizeOptions<F, T>) => Fn<Parameters<F>, ReturnType<F>>; //# sourceMappingURL=memoize.function.d.ts.map