Type alias: DeserializerConfig<Record, Data, Deserialized, Extract>
DeserializerConfig<
Record
,Data
,Deserialized
,Extract
>:object
Type parameters
• Record
• Data
• Deserialized extends DeserializedData
• Extract extends DeserializerExtract
<Record
>
Type declaration
createData()?
optional
createData: (instances
,extract
,context
) =>Awaitable
<Deserialized
>
Parameters
• instances: ModelInstance
[]
• extract: Extract
• context
Returns
Awaitable
<Deserialized
>
createRecord
createRecord:
DeserializerRecordFactory
<Record
,Data
,Deserialized
,Extract
>
deserializeAttribute()?
optional
deserializeAttribute: (deserializerContext
) =>Awaitable
<unknown
>
Parameters
• deserializerContext: DeserializerContext
<Record
, Data
, Deserialized
, ModelAttribute
>
Returns
Awaitable
<unknown
>
deserializeKey()?
optional
deserializeKey: (deserializerContext
) =>Awaitable
<string
>
Parameters
• deserializerContext: DeserializerContext
<Record
, Data
, Deserialized
>
Returns
Awaitable
<string
>
deserializeRelated()?
optional
deserializeRelated: (deserializerContext
,related
,instancesMap
) =>Awaitable
<unknown
>
Parameters
• deserializerContext: DeserializerContext
<Record
, Data
, Deserialized
, ModelRelation
>
• related: DeserializerRecord
<Record
, Data
, Deserialized
>
• instancesMap: DeserializerInstancesMap
Returns
Awaitable
<unknown
>
extractData()
extractData: (
data
,context
) =>Awaitable
<Extract
>
Parameters
• data: Data
• context
Returns
Awaitable
<Extract
>
shouldDeserialize()?
optional
shouldDeserialize: (deserializerContext
) =>Awaitable
<boolean
>
Parameters
• deserializerContext: DeserializerContext
<Record
, Data
, Deserialized
>
Returns
Awaitable
<boolean
>