Skip to main content

Function: consumeCache()

consumeCache<C, D>(context, defaultValue?): Value<Exclude<D, undefined>> | Value<Exclude<C & Partial <ConsumeCache>["cache"], undefined>>

Type parameters

C extends object

D = never

Parameters

context: C & Partial <ConsumeCache>

defaultValue?: D

Returns

Value<Exclude<D, undefined>> | Value<Exclude<C & Partial <ConsumeCache>["cache"], undefined>>

Source

packages/core/src/actions/context/consumers/consumeCache.ts:5