- memoize<T, A, K>(key, run): T & IClearable<K> & IControl<K, ReturnType<T>>
Type Parameters
- T extends ((...args: A) => any)
- A extends any[]
- K = string
Parameters
- key: ((args: A) => K)
- run: T
Returns T & IClearable<K> & IControl<K, ReturnType<T>>
- A memoized version of the original function with the ability to clear the cache
A memoization function that caches the result of a function based on its arguments.