Skip to main content

Type Alias: InferSchemaOutput<T>

InferSchemaOutput<T> = T extends undefined ? string : T extends object ? Output : T extends ZodType<infer Output, any, any> ? Output : T

Defined in: packages/core/src/types.ts:52

Infer output type from a schema
Extracts the inferred type from Zod schemas, passes through everything else as-is

  • Zod types: Extracts from _output property
  • undefined: Returns string (default response type)
  • Other types: Pass through as-is

Type Parameters

T

T