You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently in the works of using Hono to create a microservice framework and want to specifically bend the c.env functionality and use it as a DI container (whit more functionality than what .get/.set offers). That proves to be a bit more difficult than I would want to, as access to the internal core "methods" of the Hono class is limited (or not possible at all). For example: .fetch is not a class method hence overriding and calling super does not work. dispatch on the other hand is private (instead of protected) so there is no access to that either. Both of these things lead to error prone implementation in userland.
Because of that I am interested in two things:
Can someone remember the rationale on using ES6 private members over TS syntax for private/protected members. The latter one would better support the open-closed principle than ES6 private members
How open is Hono to further improve extension points beyond what is currently possible? (e.g. I would like to be able to use a userland Context or HonoRequest class but that is currently not possible).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hey,
I am currently in the works of using Hono to create a microservice framework and want to specifically bend the
c.envfunctionality and use it as a DI container (whit more functionality than what.get/.setoffers). That proves to be a bit more difficult than I would want to, as access to the internal core "methods" of the Hono class is limited (or not possible at all). For example:.fetchis not a class method hence overriding and calling super does not work.dispatchon the other hand is private (instead of protected) so there is no access to that either. Both of these things lead to error prone implementation in userland.Because of that I am interested in two things:
ContextorHonoRequestclass but that is currently not possible).Beta Was this translation helpful? Give feedback.
All reactions