Function: oneOr()
oneOr<
C
,E
,I
,RawData
,Data
,Deserialized
,NilData
,Next
>(nilRunner
,transform
?): (action
) =>Promise
<NilData
|Next
>
Run the action and deserialize one model's instance.
Type parameters
• C extends object
• E extends object
• I extends never
• RawData
• Data
• Deserialized extends DeserializedData
<ModelInstance
>
• NilData
• Next = I
Parameters
• nilRunner: ContextRunner
<C
& ConsumeAdapter
<RawData
, Data
> & ConsumeDeserializer
<NonNullable
<Data
>, Deserialized
>, E
, Awaitable
<NilData
>>
• transform?
Returns
Function
Parameters
• action: Action
<C
& ConsumeAdapter
<RawData
, Data
> & ConsumeDeserializer
<NonNullable
<Data
>, Deserialized
>, E
>
Returns
Promise
<NilData
| Next
>