You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most of the envelopes have return type ParsedResult<unknown, z.infer<T>> which allow to infer the type from the schema used with the envelope. The envelopes EventBridge, LambdaFunctionUrl, VpcLattice and VpcLatticeV2 have only ParsedResult which we need to make more specific.
Why is this needed?
So it is easier to work with the types derived from the schema instead of casting it manually.
Which area does this relate to?
Parser
Solution
Add ParsedResult<unknown, z.infer<T>> as a return type for safeParse on the the envelopes mentioned above.
Should this be considered in other Powertools for AWS Lambda languages? i.e. Python, Java, and .NET
Future readers
Please react with 👍 and your use case to help us understand customer demand.
The text was updated successfully, but these errors were encountered:
am29d
added
internal
PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.)
triage
This item has not been triaged by a maintainer, please wait
labels
Nov 21, 2024
am29d
added
confirmed
The scope is clear, ready for implementation
parser
This item relates to the Parser Utility
and removed
triage
This item has not been triaged by a maintainer, please wait
internal
PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.)
labels
Nov 21, 2024
Summary
Most of the envelopes have return type
ParsedResult<unknown, z.infer<T>>
which allow to infer the type from the schema used with the envelope. The envelopesEventBridge
,LambdaFunctionUrl
,VpcLattice
andVpcLatticeV2
have onlyParsedResult
which we need to make more specific.Why is this needed?
So it is easier to work with the types derived from the schema instead of casting it manually.
Which area does this relate to?
Parser
Solution
Add
ParsedResult<unknown, z.infer<T>>
as a return type forsafeParse
on the the envelopes mentioned above.Acknowledgment
Future readers
Please react with 👍 and your use case to help us understand customer demand.
The text was updated successfully, but these errors were encountered: