From c783e0943a0488cb3911833f5b4d576a3427cbf3 Mon Sep 17 00:00:00 2001 From: Yusuke Wada Date: Mon, 7 Aug 2023 18:39:39 +0900 Subject: [PATCH] fix(valibot-validator): fix Hook type (#105) * fix(valibot-validator): fix Hook type * changeset --- .changeset/chatty-peaches-draw.md | 5 +++++ packages/valibot-validator/src/index.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/chatty-peaches-draw.md diff --git a/.changeset/chatty-peaches-draw.md b/.changeset/chatty-peaches-draw.md new file mode 100644 index 00000000..cfcb2549 --- /dev/null +++ b/.changeset/chatty-peaches-draw.md @@ -0,0 +1,5 @@ +--- +'@hono/valibot-validator': patch +--- + +fix a Hook type diff --git a/packages/valibot-validator/src/index.ts b/packages/valibot-validator/src/index.ts index 20434ce7..b8b9afc4 100644 --- a/packages/valibot-validator/src/index.ts +++ b/packages/valibot-validator/src/index.ts @@ -6,7 +6,7 @@ import { safeParse } from 'valibot' type Hook = ( result: { success: true; data: T } | { success: false; error: ValiError }, c: Context -) => Response | Promise | void +) => Response | Promise | void | Promise export const vValidator = < T extends BaseSchema,