Skip to content

Documentation / @ripl/utilities / CachedFunction

Type Alias: CachedFunction()<TValue> ​

CachedFunction<TValue> = ReturnType<TValue>

Defined in: function.ts:10

A function wrapper that caches its result after the first invocation until explicitly invalidated.

Type Parameters ​

Type Parameter
TValue extends AnyFunction

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

A function wrapper that caches its result after the first invocation until explicitly invalidated.

Parameters ​

ParameterType
...argsParameters<TValue>

Returns ​

ReturnType<TValue>

Methods ​

invalidate() ​

invalidate(): void

Defined in: function.ts:12

Returns ​

void