New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
c.Var types unknown #2559
Labels
Comments
Makes sense, but then the docs are wrong. |
That's true. I'll fix it later! |
Hi, @janat08 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of Hono are you using?
4.2.7
What runtime/platform is your app running on?
CF Workers
What steps can reproduce the bug?
`
const redirectHtmx: MiddlewareHandler<{
Variables: {
redirectHtmx: (url: string) => Response
}
}> = async (c, next) => {
c.set('redirectHtmx', (url: string) => new Response(null, {headers: {'HX-Location': url}}))
await next()
}
app.use('*', redirectHtmx)
c.var.redirectHtmx('/page') is of type unkown
`
What is the expected behavior?
https://hono.dev/api/context#var
What do you see instead?
is of type unkown on additional methods
Additional information
No response
The text was updated successfully, but these errors were encountered: