UNPKG

tamda

Version:

Practical functional programming library for TypeScript

9 lines (8 loc) 310 B
/** * Creates a function that caches the result of function `fn` for each set of arguments, * avoiding computation when a matching set is invoked again. * @param fn Function to memoize. */ export declare function memoize<F extends Fn>(fn: F): F; declare type Fn = (...args: any) => any; export {};