openapi-typescript
openapi-typescript copied to clipboard
Better typesafety for `useInfiniteQuery`
Changes
Makes pageParamName typesafe and required. This PR also removes the fallbacks for pageParamName and pageParam, because they shouldn't have default values in the first place (and they're also no longer needed).
The should use custom cursor params test is also removed, because I believe that it shouldn't be allowed now that the param is typesafe. Users can always cast the type if they think the schema isn't right.
How to Review
Most of the changes here are type-level. I'm still not very familiar with the type utilities, so if there are any mistakes let me know.
Checklist
- [x] Unit tests updated
- [x]
docs/updated (if necessary) - [ ]
pnpm run update:examplesrun (only applicable for openapi-typescript)