Skip to content

Commit 6d72f8f

Browse files
committed
Use generics
1 parent 754ef09 commit 6d72f8f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/lib/zod/types.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ export interface ZodTool {
2020
description: string | undefined;
2121
parameters: z.ZodType;
2222
output: z.ZodType | undefined;
23-
execute: (input: any) => Promise<ExecuteToolResponse>;
24-
executeOrAuthorize: (input: any) => Promise<ExecuteToolResponse | ToolAuthorizationResponse>;
23+
execute: <T extends unknown>(input: T) => Promise<ExecuteToolResponse>;
24+
executeOrAuthorize: <T extends unknown>(
25+
input: T,
26+
) => Promise<ExecuteToolResponse | ToolAuthorizationResponse>;
2527
}
2628

2729
/**

0 commit comments

Comments
 (0)