fix(zod-openapi): add Promise<void> to Hook (#510)
* fix(zod-openapi): add Promise<void> to Hook * add changesetpull/512/head
parent
b0c94cd840
commit
88113fae8b
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@hono/zod-openapi': patch
|
||||
---
|
||||
|
||||
Add Promise<void> to Hook
|
|
@ -155,7 +155,13 @@ export type Hook<T, E extends Env, P extends string, O> = (
|
|||
error: ZodError
|
||||
},
|
||||
c: Context<E, P>
|
||||
) => TypedResponse<O> | Promise<TypedResponse<T>> | Response | Promise<Response> | void
|
||||
) =>
|
||||
| TypedResponse<O>
|
||||
| Promise<TypedResponse<T>>
|
||||
| Response
|
||||
| Promise<Response>
|
||||
| void
|
||||
| Promise<void>
|
||||
|
||||
type ConvertPathType<T extends string> = T extends `${infer Start}/{${infer Param}}${infer Rest}`
|
||||
? `${Start}/:${Param}${ConvertPathType<Rest>}`
|
||||
|
|
Loading…
Reference in New Issue