Skip to main content

Function: consumeContext()

consumeContext<Context, Key, Default>(context, key, enhancers, defaultValue?): Exclude<Default, undefined> | Exclude<Context[Key], undefined>

Type parameters

Context extends object

Key extends string | number | symbol

Default = never

Parameters

context: Context

key: Key

enhancers: string[]

defaultValue?: Default

Returns

Exclude<Default, undefined> | Exclude<Context[Key], undefined>

Source

packages/core/src/actions/context/consumers/consumeContext.ts:4