fix(server-hono): type HonoServerProvider.app field as OpenAPIHonoType instead of any#1343
Conversation
🦋 Changeset detectedLatest commit: e94a82d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough
ChangesType fix for HonoServerProvider.app
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 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)
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 |
What is current behavior?
HonoServerProvider.appis typed asany, losing type safety:What is new behavior?
The field is typed as
OpenAPIHonoType, which is exactly the type returned bycreateAppand already accepted byextractCustomEndpoints:This removes the
anyfrom the stored app reference without requiring any cast, since both the assignment (this.app = appfromcreateApp) and the consumption (extractCustomEndpoints(this.app)) already useOpenAPIHonoType.Notes for reviewers
extractCustomEndpoints(app: OpenAPIHonoType)already uses this type — no change needed there.Summary by cubic
Change
HonoServerProvider.apptype fromanytoOpenAPIHonoTypeto matchcreateAppandextractCustomEndpoints. Improves type safety and IDE autocomplete with no runtime changes.Written for commit e94a82d. Summary will update on new commits.
Summary by CodeRabbit