Interface: CallableContextMemoization()<T>

Async Memoization with a callable function

Extends

Type Parameters

T

CallableContextMemoization(): T

Async Memoization with a callable function

Returns

T

Defined in

packages/core/src/utils/context.ts:185

Properties

getter()

readonly getter: () => T

Returns

T

Inherited from

Pick.getter

Defined in

packages/core/src/utils/context.ts:112

Methods

clear()

clear(): undefined | boolean

Clear the memoization

Returns

undefined | boolean

true if the memoization is cleared, undefined if the context is not found

Inherited from

Pick.clear

Defined in

packages/core/src/utils/context.ts:142


exists()

exists(): undefined | boolean

Check if the memoization exists

Returns

undefined | boolean

true if the memoization exists, undefined if the context is not found

Inherited from

Pick.exists

Defined in

packages/core/src/utils/context.ts:152


get()

get(): T

Get the value in memoization or call the getter function

Returns

T

the value of the getter function

Inherited from

Pick.get

Defined in

packages/core/src/utils/context.ts:127


set()

set(value): undefined | WeakMap<WeakKey, any>

Set a new value to the memoization

Parameters

value: T

the new value to set

Returns

undefined | WeakMap<WeakKey, any>

the memoization map or undefined if the context is not found

Inherited from

Pick.set

Defined in

packages/core/src/utils/context.ts:163