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 StandardJSONSchemaV1<infer TInput, unknown> ? TInput : unknown;
type InferSchemaType<T> = T extends StandardJSONSchemaV1<infer TInput, unknown> ? TInput : unknown;

Defined in: types.ts:84

Infer the TypeScript type from a schema. For Standard JSON Schema compliant schemas, extracts the input type. For plain JSONSchema, returns any since we can't infer types from JSON Schema at compile time.

Type Parameters

T

T