zValidator c.req.valid("form") type error
Hey everyone, I am trying to use the zValidator middleware which I have setup in an auth.validator.ts file which looks like:
I have my route setup like:
and signUpController like:
When I am trying to use c.req.valid("form") i get the error:
Im assuming its because the validator middleware is defined in and the route is setup in index.ts.
how do I fix this? Do I have to type the Env being passed into the hono router created in index.ts? If so, how?
I have my route setup like:
and signUpController like:
When I am trying to use c.req.valid("form") i get the error:
Argument of type '"form"' is not assignable to parameter of type 'never'.Im assuming its because the validator middleware is defined in and the route is setup in index.ts.
how do I fix this? Do I have to type the Env being passed into the hono router created in index.ts? If so, how?