-
Notifications
You must be signed in to change notification settings - Fork 189
fix: config typing #1232
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
fix: config typing #1232
Conversation
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughThe PR makes three focused changes in templates/web source files: (1) adds an explicit type annotation to the Client class's public Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ 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). (184)
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 |
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
templates/web/src/client.ts.twig(2 hunks)templates/web/src/services/realtime.ts.twig(1 hunks)
🔇 Additional comments (2)
templates/web/src/client.ts.twig (1)
485-485: Verify that session property is properly typed.Removing optional chaining on
configis correct sinceconfigis a required class property. However, ensure the index signature correctly reflects thatconfig.sessionmight beundefined(see comment on lines 303-307).templates/web/src/services/realtime.ts.twig (1)
370-370: Verify that session property is properly typed.Removing optional chaining on
configis correct sinceconfigis a required property on the Client class. However, this change depends on the correct typing of theconfigobject's index signature intemplates/web/src/client.ts.twig. Ensure that the type correctly reflects thatconfig.sessionmight beundefined(see related comment in client.ts.twig, lines 303-307).
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 fixes TypeScript typing issues in the client configuration by making the config property have explicit type annotations instead of being implicitly typed. The change removes optional chaining (?.) when accessing config.session since config is now guaranteed to be non-nullable.
- Changed
configfrom an implicitly typed object to an explicitly typed object with required properties - Updated session access to remove optional chaining since config is no longer optional
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| templates/web/src/client.ts.twig | Added explicit type annotation for config property and removed optional chaining when accessing config.session |
| templates/web/src/services/realtime.ts.twig | Removed optional chaining when accessing this.client.config.session |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
fbf3e9e to
d17a631
Compare
fixes:

Summary by CodeRabbit