Type alias Infer<TValidator>

Infer<TValidator>: TValidator extends Validator<infer T> ? T : TValidator extends Validator<any>[] ? { [ P in keyof TValidator]: Infer<TValidator[P]> } : TValidator extends {} ? { [ P in keyof TValidator]: Infer<TValidator[P]> } : unknown

Extracts the result type from a validator. Define your validator and then use this to get the type of result.

Type Parameters

Generated using TypeDoc