icetouch
Type safety for middleware that sets context variables
Sorry for hijacking this thread, but I'm facing a similar issue and the above solution doesn't seem to work for me.
This returns error
Type 'BlankEnv' is not assignable to type 'Env'.
when using echoMiddleware in my get handler. It seems like app
defaults to BlankEnv and does not work with middlewares with custom variables. Defining Variables
when initializing Hono()
fixes the issue but just like OP, I do not want all other handlers to get access to it.11 replies