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 ​
| Parameter | Type |
|---|---|
...args | Parameters<TValue> |
Returns ​
ReturnType<TValue>
Properties ​
cache ​
cache:
Map<TKey,ReturnType<TValue>>
Defined in: function.ts:18