Function: create()
create(instance)
create<
C
,E
,D
,I
,Record
,Related
,Data
>(instance
):ContextEnhancer
<C
&ConsumeSerializer
<Record
,Related
,Data
>,E
,C
&ConsumeModel
<Model
<D
,I
>> &ConsumeInstance
<I
>>
Type parameters
• C extends object
• E extends object
• D extends object
• I extends ModelInstance
<D
>
• Record
• Related
• Data
Parameters
• instance: ModelClassInstance
<D
> & I
Returns
ContextEnhancer
<C
& ConsumeSerializer
<Record
, Related
, Data
>, E
, C
& ConsumeModel
<Model
<D
, I
>> & ConsumeInstance
<I
>>
Source
packages/core/src/actions/context/enhancers/crud/create.ts:94
create(instance, throughInstance, throughRelation)
create<
C
,E
,D
,RD
,I
,K
,RI
,Record
,Related
,Data
>(instance
,throughInstance
,throughRelation
):ContextEnhancer
<C
&ConsumeSerializer
<Record
,Related
,Data
>,E
,C
&ConsumeModel
<Model
<D
,I
>> &ConsumeRelation
<RD
[K
]> &ConsumeInstance
<RI
> &ConsumeId
>
Type parameters
• C extends object
• E extends object
• D extends object
• RD extends ModelSchemaRelations
<D
>
• I extends ModelInstance
<D
>
• K extends string
• RI extends never
• Record
• Related
• Data
Parameters
• instance: RI
• throughInstance: ModelClassInstance
<D
> & I
• throughRelation: ModelRelationKey
<D
> & K
Returns
ContextEnhancer
<C
& ConsumeSerializer
<Record
, Related
, Data
>, E
, C
& ConsumeModel
<Model
<D
, I
>> & ConsumeRelation
<RD
[K
]> & ConsumeInstance
<RI
> & ConsumeId
>
Source
packages/core/src/actions/context/enhancers/crud/create.ts:94