dougmoscrop / serverless-http

Use your existing middleware framework (e.g. Express, Koa) in AWS Lambda 🎉
Other
1.72k stars 166 forks source link

fix: Wrap serverless function result in promise in TS definitions #124

Closed binnut closed 4 years ago

binnut commented 4 years ago

When i started using serverless-http a few hours ago i had some trouble geting started with testing based on the serverless() call not having the statusCode and body attributes that I was expecting based on the TS declarations. After some debugging I found the problem to be that the result was a promise, wrapping the expected results in a callback. I just wanted to contribute my findings so that the process will be easier the next person.