Closed nateiler closed 3 years ago
Unfortunately, this is a limitation of TypeScript related to generics and not solvable by this library. You can find the relevant links and discussions here: https://github.com/dbartholomae/lambda-middleware/issues/36#issuecomment-720755530
I tried to follow the bodyParser example and build my own middleware which alters the event. I was also adding the first party cors middleware to the routine which produced some type errors I cannot figure out.
In the first scenario, the first middleware is adding 'foo' to the event -> cors -> business logic which doesn't hold the type reference:
Anything stick out?