aws-samples / serverless-snippets

Snippets of code used for Serverless Development. Code examples hosted on serverlessland.com/snippets
https://serverlessland.com/snippets
MIT No Attribution
140 stars 93 forks source link

Fix incorrect return value of DDB Lambda with Batch Item Handling TypeScript snippet #192

Closed clarkmains closed 4 months ago

clarkmains commented 4 months ago

Return value of the TypeScript code snippet was incorrect as it was just an array.

This PR fixes the incorrect return value and changes the return type to DynamoDBBatchResponse as a guardrail, as implementing this type would have highlighted the issue with the return value in an editor.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.