Skip to content

Commit e9dca67

Browse files
committed
Update example for fromDynamodbRecord()
Signed-off-by: moznion <moznion@mail.moznion.net>
1 parent d6400ff commit e9dca67

File tree

4 files changed

+225
-2127
lines changed

4 files changed

+225
-2127
lines changed

examples/ttypescript/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { dynamodbRecord } from '@moznion/ts-dynamodb-attributes-transformer';
1+
import { dynamodbRecord, fromDynamodbRecord } from '../../index';
22
import { AttributeValue } from '@aws-sdk/client-dynamodb';
33

44
interface User {
@@ -15,5 +15,7 @@ const record: Record<keyof User, AttributeValue> = dynamodbRecord<User>({
1515
['buz', 'qux'],
1616
]),
1717
});
18-
1918
console.log(JSON.stringify(record));
19+
20+
const user: User = fromDynamodbRecord<User>(record);
21+
console.log(user);

0 commit comments

Comments
 (0)