Closed parkan closed 3 years ago
Issue-Label Bot is automatically applying the label bug
to this issue, with a confidence of 0.95. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
seems that this exact configuration is used in https://github.com/dbartholomae/lambda-middleware/blob/main/internal/e2e-tests/examples/helloWorld.ts#L52 but the handler doesn't actually use anything other than body
on the event, I can add a test for .auth/explicit event type expectation
Unfortunately there is a limit to how TypeScript is implemented that currently makes it impossible to have a full 100% passthrough of events. This was discussed in detail in #36. Please feel free to play around with it a bit, maybe there is a way to improve it I didn't find :)
gotcha, gonna close this for now and mess around with it a bit
Describe the bug
Hello it's me again 🙂
jsonSerializer (and I think some of the other middlewares as well) don't respect the pattern of generically passing the event from the previous middleware described in the README so the type information about the modified event is lost, replaced with base
APIGatewayEvent
To Reproduce
Expected behavior
Type information is preserved in the chain
Additional context
This should be a simple fix, replace
with
happy to PR this!