fix(lit-query): propagate mutation state generics - #11355
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthrough
ChangesLit mutation state generic propagation
| Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This change improves mutation-state generic inference while preserving existing runtime cache, filtering, subscription, and callback behavior; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 unsupported.) ✨ Finishing Touches🧪 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 |
🎯 Changes
@tanstack/lit-querydid not receive theuseMutationStategeneric inference added to the other framework adapters in #10373. As a result, a selector with an explicitly typedMutationState<TData, TError, TVariables>still sawMutation<unknown, Error, unknown, unknown>.This PR:
Mutationtype from the selectedMutationStateresultThe regression test fails on current
mainand passes with this change.✅ Checklist
pnpm run test:pr, or these tests do not apply to this pull request.🚀 Release Impact
Summary by CodeRabbit
Bug Fixes
useMutationState.selectcallback, providing accurate types for mutation data, errors, and variables.Tests