openapi-typescript
openapi-typescript copied to clipboard
Infer Return Type for `select` from `useInfiniteQuery`
Changes
Updates the types for useInfiniteQuery to infer the return type from the select option, if provided. Adds onto #2105 with recent addition of #2117.
Also adds the docs for useInfiniteQuery to the navigation in the docs site, it wasn't being linked to, and adds a note about customizing the query param name for pagination.
How to Review
See previous PR for the type inference in #2105 and additional test added to the useInfiniteQuery suite to check the return type is correctly inferred and functionally sound from useInfiniteQuery.
Checklist
- [x] Unit tests updated
- [x]
docs/updated (if necessary) - [ ]
pnpm run update:examplesrun (only applicable for openapi-typescript)
Deploy Preview for openapi-ts failed.
| Name | Link |
|---|---|
| Latest commit | 3c7008940ca6c8d3a22ddb9056e6651b393f2bd1 |
| Latest deploy log | https://app.netlify.com/projects/openapi-ts/deploys/681400905592a00008b6ca47 |
🦋 Changeset detected
Latest commit: 3c7008940ca6c8d3a22ddb9056e6651b393f2bd1
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 1 package
| Name | Type |
|---|---|
| openapi-react-query | Minor |
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
Freshly rebased on main. Who is the best reviewer for this change? Maybe @drwpow or @kerwanp?