fix(types): return void promises from the express receiver middleware parser#2141
Merged
zimeg merged 2 commits intoslackapi:mainfrom Jun 19, 2024
Merged
fix(types): return void promises from the express receiver middleware parser#2141zimeg merged 2 commits intoslackapi:mainfrom
zimeg merged 2 commits intoslackapi:mainfrom
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. |
filmaj
approved these changes
Jun 19, 2024
Contributor
filmaj
left a comment
There was a problem hiding this comment.
Weird but fine! As long as tests pass, ![]()
Thanks for fixing this!
Member
Author
|
@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 🙏 |
zimeg
commented
Jun 19, 2024
| } | ||
| } | ||
|
|
||
| return next(); |
Member
Author
There was a problem hiding this comment.
This is somewhat questionable to me but it raises this type error for me:
return next(); ■ Async arrow function expected no return value.
This was referenced Sep 5, 2024
This was referenced Sep 13, 2024
This was referenced Sep 20, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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