Docs
CodeRabbit
Cloudflare
Railway
Netlify
AG Grid
WorkOS
OpenRouter
Clerk
SerpAPI
Prisma
Unkey
Sentry
Electric
CodeRabbit
Cloudflare
Railway
Netlify
AG Grid
WorkOS
OpenRouter
Clerk
SerpAPI
Prisma
Unkey
Sentry
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