From d75e9ec60518d042e3e67416ab9f0555046c3168 Mon Sep 17 00:00:00 2001 From: Sor4chi <80559385+sor4chi@users.noreply.github.com> Date: Sat, 25 Jan 2025 22:46:10 +0900 Subject: [PATCH] fix(types): missing response type on `OnHandlerInterface` (#3852) --- src/types.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/types.ts b/src/types.ts index 0a46f0e03..74afa4c34 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1360,6 +1360,7 @@ export interface OnHandlerInterface< M extends string, P extends string, MergedPath extends MergePath = MergePath, + R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, @@ -1393,7 +1394,7 @@ export interface OnHandlerInterface< H, H, H, - H + H ] ): HonoBase< IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11]>, @@ -1653,6 +1654,7 @@ export interface OnHandlerInterface< Ms extends string[], P extends string, MergedPath extends MergePath = MergePath, + R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, @@ -1683,7 +1685,7 @@ export interface OnHandlerInterface< H, H, H, - H + H ] ): HonoBase< IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9, E10]>, @@ -1696,6 +1698,7 @@ export interface OnHandlerInterface< Ms extends string[], P extends string, MergedPath extends MergePath = MergePath, + R extends HandlerResponse = any, I extends Input = BlankInput, I2 extends Input = I, I3 extends Input = I & I2, @@ -1729,7 +1732,7 @@ export interface OnHandlerInterface< H, H, H, - H + H ] ): HonoBase< IntersectNonAnyTypes<[E, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11]>,