How to type DynamoDB GetCommand
Hi all!
I have something like this:
The returned object is response.Item and it is exactly what I expect. The problem is, the actual response.Item is literally just Record<string, any> | undefined.
Is type casting the only way here just for good dx?
1 Reply
casting could work but won't actually guarantee anything at runtime. use a validator like
zod
for that