deformation
Spec
deformation<TTarget>(
target: AttributeMap,
RootTClass: ClassCapture<TTarget>
): TTarget
Convert AttributeMap to DynamoEntity.
Input
Name
Type
Information
target
AttributeMap
AttributeMap to convert to entity.
RootTClass
ClassCapture<TTarget>
Reference of @DynamoEntity
class
An error is occurs, if the target
is null or undefined.
Example
const entity: Cat = Mapper.deformation(
{
id: { N: "666" }
},
Cat
);
It will be deformationed as,
Cat {
"id": 666
}
Internal Logic
Use the deformatProperty
method to perform a deformation on all the properties, then merge all the results.
Last updated
Was this helpful?