Open wststone opened 3 months ago
Bump! I have the same issue.
Hi @wststone @cybercoder-naj
The Zod Validator uses z.input
to infer a query using the request type. With it, the value with z.coerce
will have undefined
and optional:
This means the value defined z.coerce
can be optional or undefined
. On the other hand, if you specify the value with z.number()
, it can not allow undefined.
As shown in the screenshots above, the rpc client query paramters should have the correct inferred number type.
package version: "hono": "^4.5.4" "@hono/zod-validator": "^0.2.2"