8000 fix: Properly type handler return to infer the input type · aklinker1/zeta@2556738 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2556738

Browse files
committed
fix: Properly type handler return to infer the input type
1 parent 1b85ded commit 2556738

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/types.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,8 +458,8 @@ export type GetRouteHandlerReturnType<TRouteDef extends RouteDef> =
458458
TRouteDef extends { responses: symbol } // is any check
459459
? any
460460
: TRouteDef extends { responses: infer TResponses }
461-
? TResponses extends StandardSchemaV1<infer TResponse>
462-
? TResponse
461+
? TResponses extends StandardSchemaV1
462+
? StandardSchemaV1.InferInput<TResponses>
463463
: TRouteDef["responses"] extends Record<number, StandardSchemaV1<any>>
464464
? StatusResult
465465
: never

0 commit comments

Comments
 (0)
0