Conversation
…initialData', 'select', and 'Accessor<QueryClient>'
|
View your CI Pipeline Execution ↗ for commit d0bc2d3
☁️ 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 📦
|
📝 WalkthroughWalkthroughA new TypeScript type test file was added for Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/solid-query/src/__tests__/useInfiniteQuery.test-d.tsx (1)
96-97: Consider linking TODOs to a tracked issue for thepageParamsgeneric-order limitation.This makes the known typing gap easier to prioritize and prevents TODOs from becoming stale.
📝 Minimal follow-up tweak
- // TODO: Order of generics prevents pageParams to be typed correctly. Using `unknown` for now + // TODO(#<issue-id>): Order of generics prevents pageParams from being typed correctly. Using `unknown` for nowAlso applies to: 154-155, 200-201
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/solid-query/src/__tests__/useInfiniteQuery.test-d.tsx` around lines 96 - 97, Replace the bare TODO about the pageParams generic-order typing gap with a linked TODO that references a tracked issue (e.g., "TODO: link to issue `#NNN`" or a full issue URL) so it’s discoverable; update the comment near the infiniteQuery usage (reference symbol infiniteQuery and the pageParams generic) and apply the same change to the other occurrences mentioned (the TODOs at the other two locations) so all TODOs consistently point to the single tracker issue.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@packages/solid-query/src/__tests__/useInfiniteQuery.test-d.tsx`:
- Around line 96-97: Replace the bare TODO about the pageParams generic-order
typing gap with a linked TODO that references a tracked issue (e.g., "TODO: link
to issue `#NNN`" or a full issue URL) so it’s discoverable; update the comment
near the infiniteQuery usage (reference symbol infiniteQuery and the pageParams
generic) and apply the same change to the other occurrences mentioned (the TODOs
at the other two locations) so all TODOs consistently point to the single
tracker issue.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 43f214fa-5580-4600-af69-a8793a386c4c
📒 Files selected for processing (1)
packages/solid-query/src/__tests__/useInfiniteQuery.test-d.tsx
🎯 Changes
Add type tests for
useInfiniteQueryinsolid-query, covering:pageParamanddirectiontype inference inqueryFnfetchInfiniteQuery/prefetchInfiniteQuerypage param typesinitialDataoverload (DefinedUseInfiniteQueryResultvsUseInfiniteQueryResult)selectdata transformationgetNextPageParam/getPreviousPageParamtyped paramsisFetchNextPageError,isFetchPreviousPageError,isLoadingError,isRefetchError)Accessor<QueryClient>second argument✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit
useInfiniteQueryhook to validate type inference across pagination scenarios, data initialization, error states, and custom query client configurations.