-
-
Notifications
You must be signed in to change notification settings - Fork 17
chore(orm): simplify typing of client constructor #525
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
Conversation
WalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧬 Code graph analysis (1)packages/orm/src/client/contract.ts (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
🔇 Additional comments (1)
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 |
|
Claude finished @ymc9's task —— View job Code Review for PR #525Reviewing the changes to simplify typing of client constructor. Todo List:
Review SummaryThis is a good, focused change that improves TypeScript ergonomics for the Changes MadeThe change is in - new <Schema extends SchemaDef, Options extends ClientOptions<Schema>>(
+ new <Schema extends SchemaDef, Options extends ClientOptions<Schema> = ClientOptions<Schema>>(Code Quality & Best Practices ✅
Potential Issues ✅
Performance Considerations ✅
Security Concerns ✅
Test Coverage Considerations ✅
Recommendation: ✅ APPROVEThis is a well-crafted improvement that enhances the developer experience by making the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR simplifies the typing of the client constructor by adding a default type parameter to the Options generic. The change makes the ClientConstructor interface more convenient to use when the specific options type is not explicitly needed.
- Adds a default type parameter
= ClientOptions<Schema>to theOptionsgeneric inClientConstructor
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.