-
Notifications
You must be signed in to change notification settings - Fork 404
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(types): return void promises from the express receiver middleware parser #2141
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2141 +/- ##
==========================================
- Coverage 82.03% 82.00% -0.03%
==========================================
Files 18 18
Lines 1536 1539 +3
Branches 442 442
==========================================
+ Hits 1260 1262 +2
- Misses 178 179 +1
Partials 98 98 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird but fine! As long as tests pass,
Thanks for fixing this!
@filmaj so much agreement with this weirdness... But appreciate the fast review! I'll keep an eye out for strangeness that comes from this, though I'm confident in our tests 🙏 |
} | ||
} | ||
|
||
return next(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is somewhat questionable to me but it raises this type error for me:
return next(); ■ Async arrow function expected no return value.
Summary
This PR fixes type errors found in #2140 caused by the latest floating version of @types/express:
Notes
I'm pretty sure sending
res.send()
then returning after is equivalent to what existed before. Just without the typing strangeness.The final
next()
without a return seems alright too IMO since this function returns as aPromise<void>
.Requirements