-
Notifications
You must be signed in to change notification settings - Fork 501
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
feat(types): correctly type $fetch based on the method #686
Conversation
I've fixed the failing test and added a few new ones to assert the new types. The |
Codecov Report
@@ Coverage Diff @@
## main #686 +/- ##
==========================================
- Coverage 72.01% 67.07% -4.95%
==========================================
Files 57 57
Lines 5050 4267 -783
Branches 546 462 -84
==========================================
- Hits 3637 2862 -775
+ Misses 1403 1402 -1
+ Partials 10 3 -7
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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 looks very nice - thanks! π
π Linked issue
#685
β Type of change
π Description
This feature fixed the types of the routes when used with $fetch, when there are multiple handlers with different methods for the same route. It detects the method given with the options, and returns the correct set of types for that call. This also works if you don't specify a method or if the handler does not specify a method.
This might be a breaking change, as it changes the format of
InternalApi
.π Checklist
I don't think a documentation update is needed here.