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

InferSchemaType

Type Alias: InferSchemaType<T>

ts
type InferSchemaType<T> = T extends z.ZodType ? z.infer<T> : any;
type InferSchemaType<T> = T extends z.ZodType ? z.infer<T> : any;

Defined in: types.ts:60

Infer the TypeScript type from a schema. For Zod schemas, uses z.infer to get the proper type. For JSONSchema, returns any since we can't infer types from JSON Schema at compile time.

Type Parameters

T

T