fix(valibot-validator): fix Hook type (#105)
* fix(valibot-validator): fix Hook type * changesetpull/106/head
parent
1fb2ab1dad
commit
c783e0943a
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'@hono/valibot-validator': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix a Hook type
|
|
@ -6,7 +6,7 @@ import { safeParse } from 'valibot'
|
||||||
type Hook<T, E extends Env, P extends string> = (
|
type Hook<T, E extends Env, P extends string> = (
|
||||||
result: { success: true; data: T } | { success: false; error: ValiError },
|
result: { success: true; data: T } | { success: false; error: ValiError },
|
||||||
c: Context<E, P>
|
c: Context<E, P>
|
||||||
) => Response | Promise<Response> | void
|
) => Response | Promise<Response> | void | Promise<Response | void>
|
||||||
|
|
||||||
export const vValidator = <
|
export const vValidator = <
|
||||||
T extends BaseSchema,
|
T extends BaseSchema,
|
||||||
|
|
Loading…
Reference in New Issue