-
-
Notifications
You must be signed in to change notification settings - Fork 272
Add type annotations to queryOptions for TanStack Query #2964
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
Add type annotations to queryOptions for TanStack Query #2964
Conversation
|
|
🦋 Changeset detectedLatest commit: cdc50e5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@NovakAnton is attempting to deploy a commit to the Hey API Team on Vercel. A member of the Team first needs to authorize it. |
commit: |
Updated type annotations for queryOptions in TanStack Query.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2964 +/- ##
==========================================
+ Coverage 29.41% 29.43% +0.01%
==========================================
Files 403 405 +2
Lines 35766 35815 +49
Branches 2066 2065 -1
==========================================
+ Hits 10522 10541 +19
- Misses 25217 25247 +30
Partials 27 27
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hey @mrlubos, I saw the Codecov report showing missing coverage in queryOptions.ts and call.ts (the two files I edited). I’m not yet familiar with the project’s test setup — could you let me know where or how you’d like me to add tests to get this passing? Once I know where they should go, I’ll add them and update the PR. Thanks! |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
mrlubos
left a comment
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.
Looks good! The only thing that "feels off" is the ReturnType generic, did you consider any alternatives? I'd probably expect a proper type there too
Extended CallTsDsl to support type arguments via typeArgs() method
Updated queryOptions.ts to include type parameters:
- TQueryFnData: response type
- TError: error type
- TData: response type
- TQueryKey: ReturnType
Generated queryOptions now have proper type annotations
Ran pnpm build --filter="@hey-api/**"
Ran pnpm examples:generate
Ran pnpm test:update