docs(svelte-query): correct 'initialData'/'select' JSDoc inaccuracy - #11577
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: TanStack/query/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 10 included reviews per hour; 4 remain after this review. 📝 WalkthroughWalkthroughThe change updates Svelte Query overload documentation. It clarifies that ChangesSvelte Query documentation
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Other Merge Risk: ⚪ Minimal · up to This documentation update clarifies the existing select behavior without changing runtime code or published APIs, so it is ready to merge. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
View your CI Pipeline Execution ↗ for commit 38691e9
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version PreviewNo changeset entries found. Merging this PR will not cause a version bump for any packages. |
size-limit report 📦
|
🎯 Changes
The
queryOptions/createQueryoverloads selected wheninitialDatais set stated thatdatais "neverundefined" without qualification. This is only true when noselectis used — aselectcan changeTDatato a type that includesundefined. Added the(unless a select changes TData to include undefined)qualifier inqueryOptions.tsandcreateQuery.ts.Only these two spots make the unqualified claim in
svelte-query:DefinedInitialDataOptionsitself carries no JSDoc, andinfiniteQueryOptions.ts/createInfiniteQuery.tscarry noinitialData-related prose to correct.Companion PRs for the same pattern: #11574 (
@tanstack/react-query/@tanstack/preact-query), #11575 (@tanstack/vue-query), #11576 (@tanstack/solid-query).svelte-query'screateQueries(theQueriesOptionsarray type) doesn't carry the equivalent user-facing JSDoc that react/preact had (it only has an internal implementation comment), so that half of the pattern doesn't apply here either, same as vue/solid.✅ Checklist
pnpm run test:pr, or these tests do not apply to this pull request.🚀 Release Impact
Summary by CodeRabbit
selecttransforms data to includeundefined, even wheninitialDatais provided.