Skip to content

Documentation / @ripl/utilities / MemoizedFunction

Type Alias: MemoizedFunction()<TValue, TKey> ​

MemoizedFunction<TValue, TKey> = ReturnType<TValue>

Defined in: function.ts:16

A function wrapper that caches results per unique key, exposing the underlying cache Map.

Type Parameters ​

Type Parameter
TValue extends AnyFunction
TKey

MemoizedFunction(...args): ReturnType<TValue>

A function wrapper that caches results per unique key, exposing the underlying cache Map.

Parameters ​

ParameterType
...argsParameters<TValue>

Returns ​

ReturnType<TValue>

Properties ​

cache ​

cache: Map<TKey, ReturnType<TValue>>

Defined in: function.ts:18