Skip to main content

Function: consumeModel()

consumeModel<C, M, D>(context, defaultValue?): Exclude<D, undefined> | Exclude<C & Partial <ConsumeModel<M>>["model"], undefined>

Type parameters

C extends object

M extends Model

D = never

Parameters

context: C & Partial <ConsumeModel<M>>

defaultValue?: D

Returns

Exclude<D, undefined> | Exclude<C & Partial <ConsumeModel<M>>["model"], undefined>

Source

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