-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
WIP: infer errors from Throws returns #10034
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
WIP: infer errors from Throws returns #10034
Conversation
|
📝 WalkthroughWalkthroughIntroduces a comprehensive TypeScript type system for expressing and extracting error types from function return types using phantom types ( Changes
Suggested labels
Suggested reviewers
Poem
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes 🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (5)
🧰 Additional context used🧠 Learnings (4)📓 Common learnings📚 Learning: 2025-08-19T03:18:18.303ZApplied to files:
📚 Learning: 2025-11-02T22:52:33.071ZApplied to files:
📚 Learning: 2025-11-22T09:06:05.219ZApplied to files:
🧬 Code graph analysis (4)packages/react-query/src/useQuery.ts (2)
packages/react-query/src/__tests__/mutationOptions.test-d.tsx (1)
packages/react-query/src/useMutation.ts (3)
packages/react-query/src/__tests__/useQuery.test-d.tsx (2)
🔇 Additional comments (13)
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 |
Summary
Throwsreturn annotations when providedanyand stripThrowsto avoid pollution in data inferencePromise<any>fallbackTesting
pnpm --filter @tanstack/react-query test:types(fails intest:types:tscurrentatpackages/react-query/src/__tests__/useQuery.test.tsx:2186: NotifyOnChangeProps type mismatch)Summary by CodeRabbit
Release Notes
✏️ Tip: You can customize this high-level summary in your review settings.