refactor(request): replace private symbol with static method#4646
refactor(request): replace private symbol with static method#4646BarryThePenguin wants to merge 2 commits intohonojs:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4646 +/- ##
=======================================
Coverage 91.45% 91.45%
=======================================
Files 173 172 -1
Lines 11322 11318 -4
Branches 3279 3279
=======================================
- Hits 10354 10351 -3
+ Misses 967 966 -1
Partials 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hey @BarryThePenguin Thank you for the PR! One of the purposes of this PR is to fix the build problem, like #4640, right? I think it is worth accepting, but for details, we have to be careful when updating the HonoRequest, and this change will increase the bundle size very slightly. |
Yes, I was doing some investigating and found this alternative approach. I thought I'd share it to see what others thought.
Yeah, that makes sense. I wasn't able to find out why a symbol was chosen originally. If it works then there's no reason to change it. There's some added type safety using a static method, but it's all internal, so there's no real benefit for users. |
|
hi @BarryThePenguin and @yusukebe Thank you for the suggestion!
I haven't fully verified if this resolves the issue, but I think fixing it in the direction suggested in #4651 would be best. |
Instead of passing
Sounds good 👍🏻 |
|
Hi @BarryThePenguin, Thank you for the update! I apologize for leaving an incomplete comment last time. My thoughts are as follows, so I'd like to maintain the current implementation approach.
|
I agree with this! |
|
Ok, thank you for the extra details |
Replaces usage of the private
GET_MATCH_RESULTsymbol with a staticmatchedRoutes()methodThis keeps
#matchResultprivate while still allowing access tomatchedRoutes()