Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jan 1, 2023

Conversation

codyfyi
Copy link
Contributor

@codyfyi codyfyi commented May 28, 2021

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 .

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
Copy link
Collaborator

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

@naorpeled naorpeled changed the title Fix typing for Response#type function. fix(Response/type): resolve void returned instead of this Jan 1, 2023
@naorpeled naorpeled merged commit 85a8654 into jeremydaly:main Jan 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants