formationMap
Spec
formationMap<TSource>(
source: TSource,
TClass: ClassCapture<TSource>
): { M: MapAttributeValue }Input
Example
@DynamoEntity()
class Cat {
@DynamoProperty({ keyType: KeyType.hash })
id!: number;
@DynamoProperty({ keyType: KeyType.attr })
name!: string;
}
const badCat :Cat = {
id: 666,
name: "garfield"
};
const dynamo : AttributeMap = Mapper.formation(badCat, Cat);Last updated