jeremydaly / lambda-api

Lightweight web framework for your serverless applications
https://serverless-api.com
MIT License
1.41k stars 125 forks source link

fix(Response/type): resolve void returned instead of this #181

Closed codyfyi closed 1 year ago

codyfyi commented 3 years ago

It is valid to chain response.type('application/xml').status(200).send(xml) because the type function returns an instance of this. This change correct the index.d.ts typing description from incorrectly returning void to correctly returning this as apparent from lib/response.js .

naorpeled commented 1 year ago

Good catch @codyfyi!!! Thanks for your contribution, you're awesome 😎