Documentation
Framework
Version
Class References
Function References
Interface References
Type Alias References
Variable References

InferToolOutput

Type Alias: InferToolOutput<T>

ts
type InferToolOutput<T> = T extends object ? TOutput extends z.ZodType ? z.infer<TOutput> : TOutput extends JSONSchema ? any : any : any;
type InferToolOutput<T> = T extends object ? TOutput extends z.ZodType ? z.infer<TOutput> : TOutput extends JSONSchema ? any : any : any;

Defined in: tools/tool-definition.ts:72

Extract the output type from a tool (inferred from Zod schema, or any for JSONSchema)

Type Parameters

T

T