Documentation

type Schema​.Infer

A utility type that infers the parsed value type from a Builder or Schema instance.

type Infer<T extends Builder | Schema<any>> =
T extends Schema<infer S>
? Infer<S>
: T extends Builder<infer U>
? U
: never;

Related