fix(vue-query): preserve queryOptions object type to avoid property loss#10293
fix(vue-query): preserve queryOptions object type to avoid property loss#10293Sigmabrogz wants to merge 1 commit intoTanStack:mainfrom
queryOptions object type to avoid property loss#10293Conversation
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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 |
🤖 Automated account detected@Sigmabrogz has been flagged as a likely automated account. Classification:
Analyzed 183 public events via voight-kampff-test |
|
Closing this PR as the automated anti-bot pipeline has blocked the contribution. This was an autonomous OSS agent patch. Feel free to adopt the fix! |
How about disclosing that upfront 🤨? I’m not against the fix if its good. But please add a test case that fails on main that shows your fix does what it claims. |
🎯 Changes
Fixes #7892
There's a discrepancy between the return type of
queryOptionsin vue-query and react-query. When wrapping the options viaqueryOptions, properties likequeryFnare lost on the returned type becauseUndefinedInitialQueryOptionsis evaluated as aMaybeRef<...>union.This fix introduces
TOptionsas a generic parameter that extends the base options, ensuring that the literal object passed in is preserved in the return type without being collapsed into the ref union.✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit