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
If I try to access the logger from within the hook
app.get("/customer",zValidator("query",querySchema,(result,ctx)=>{// this is type never constlogger=ctx.get('logger');if(!result.success){logger.debug('Validation error: ',result.error)ctx.text("InvalidRequest",400);}),async(ctx)=>{// do things });
But the typings for the generic are not documented so I'm not sure if that's intended or even what that 4th one is only that it's required and is a string.
I feel like it should infer from it's context, but if inferring them isn't possible I would maybe suggest moving the env type up the list as all the rest of the types seem to infer without trouble.
The text was updated successfully, but these errors were encountered:
If i have types passed to the Hono generic like:
If I try to access the logger from within the hook
I think I can do this
But the typings for the generic are not documented so I'm not sure if that's intended or even what that 4th one is only that it's required and is a string.
I feel like it should infer from it's context, but if inferring them isn't possible I would maybe suggest moving the env type up the list as all the rest of the types seem to infer without trouble.
The text was updated successfully, but these errors were encountered: