File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 11import type { HonoRequest } from "hono" ;
2- import type { SafeParseReturnType , ZodType , ZodTypeDef , output } from "zod" ;
2+ import type z from "zod" ;
33
4- // biome-ignore lint/suspicious/noExplicitAny: <explanation>
5- export async function requestBody < T extends ZodType < any , ZodTypeDef , any > > (
4+ export async function requestBody < T extends z . ZodType = z . ZodTypeAny > (
65 req : HonoRequest ,
76 schema : T ,
8- // biome-ignore lint/suspicious/noExplicitAny: <explanation>
9- ) : Promise < SafeParseReturnType < any , output < T > > > {
7+ // biome-ignore lint/suspicious/noExplicitAny: Input type is `any` as it comes from the request
8+ ) : Promise < z . SafeParseReturnType < any , z . output < T > > > {
109 const contentType = req . header ( "Content-Type" ) ;
1110 if (
1211 contentType === "application/json" ||
You can’t perform that action at this time.
0 commit comments