docs(vue-query): correct 'initialData'/'select' JSDoc inaccuracy - #11575
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 (2)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe pull request updates Vue Query JSDoc and reference documentation. Defined-data overloads now document the ChangesVue Query documentation
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Other Suggested reviewers: Merge Risk: ⚪ Minimal · up to This change clarifies when selected query data may be undefined without changing library behavior, 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 54f67f1
☁️ 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
DefinedInitialQueryOptions,DefinedInitialDataInfiniteOptions, and thequeryOptions/useQuery/infiniteQueryOptions/useInfiniteQueryoverloads selected wheninitialDatais set all 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.ts,infiniteQueryOptions.ts(2 spots),useInfiniteQuery.ts, anduseQuery.ts.In
useQuery.ts, the@returnsdoc for this overload previously packed thestatuscaveat inside the same parenthetical as theundefinedclaim; it's now split into its own sentence so the newselectcaveat doesn't get buried alongside it.Companion PR for
@tanstack/react-query/@tanstack/preact-query: #11574.vue-query'sUseQueriesOptions(thequeriesarray type foruseQueries) doesn't carry the equivalent user-facing JSDoc that react/preact had (it only has an internal implementation comment), so that part of the pattern doesn't apply here and isn't touched in this PR.✅ Checklist
pnpm run test:pr, or these tests do not apply to this pull request.🚀 Release Impact
Summary by CodeRabbit
undefinedwhen aselecttransformation allows it.