Docs
CodeRabbit
Cloudflare
Railway
Netlify
OpenRouter
AG Grid
SerpAPI
WorkOS
Clerk
Sentry
Prisma
Unkey
Electric
CodeRabbit
Cloudflare
Railway
Netlify
OpenRouter
AG Grid
SerpAPI
WorkOS
Clerk
Sentry
Prisma
Unkey
Electric
Class References
Function References
Interface References
Type Alias References
Variable References
Type Alias References

InferToolOutput

Type Alias: InferToolOutput<T>

ts
type InferToolOutput<T> = T extends object ? TOutput extends StandardJSONSchemaV1<infer TInferred, unknown> ? TInferred : TOutput extends JSONSchema ? unknown : unknown : unknown;
type InferToolOutput<T> = T extends object ? TOutput extends StandardJSONSchemaV1<infer TInferred, unknown> ? TInferred : TOutput extends JSONSchema ? unknown : unknown : unknown;

Defined in: packages/ai/src/activities/chat/tools/tool-definition.ts:88

Extract the output type from a tool (inferred from Standard JSON Schema, or unknown for plain JSONSchema)

Type Parameters

T

T