What's Changed
✨ Features
- Opt-in
strictVariables(#78)
RegisterstrictVariablesto make TypeScript requirevariablesat the call site whenever the fetcher needs them:interface Register { strictVariables: true } } This applies to hooks created by createQuery, createInfiniteQuery, createSuspenseQuery, createSuspenseInfiniteQuery and router, as well as to inferOptions. Hooks without variables are not affected. To keep variables optional for a fetcher that can run without them, type them as Variables | undefined. This is fully opt-in. Without the registration, nothing changes.
🐛 Fixes
- Exclude SkipToken from infinite query queryFn types (#76)
getOptions() and getFetchOptions() on infinite query hooks no longer include SkipToken in the queryFn type. You can now call queryFn directly or pass the options to queryClient.pe errors.
🙏 Thanks
Many thanks to Moe @moeBabazadeh for #78 and @LudvigHz for #76.