diff --git a/.changeset/gentle-coins-care.md b/.changeset/gentle-coins-care.md new file mode 100644 index 00000000..c38cbc9f --- /dev/null +++ b/.changeset/gentle-coins-care.md @@ -0,0 +1,5 @@ +--- +'@hono/zod-validator': patch +--- + +fix(zod-validator): fixed zod-validator hook types diff --git a/packages/zod-validator/src/index.ts b/packages/zod-validator/src/index.ts index 00f6f250..ed0a5ac0 100644 --- a/packages/zod-validator/src/index.ts +++ b/packages/zod-validator/src/index.ts @@ -5,14 +5,7 @@ import type { z, ZodSchema, ZodError } from 'zod' export type Hook = ( result: { success: true; data: T } | { success: false; error: ZodError; data: T }, c: Context -) => - | Response - | Promise - | void - | Promise - | TypedResponse - | Promise> - | Promise | void> +) => Response | Promise | void | Promise | TypedResponse export const zValidator = < T extends ZodSchema,