/** A validation method that is not tied to ValidationErrors but instead should just throw an Error with error messages */ export type ValidationThrower = (value: T) => Promise | void; export declare namespace ValidationThrower { function isValid(value: T, validator: ValidationThrower): Promise; } export interface ValidationGenericLike { validate(value: T): Promise; } export type ValidatorsSchema = Record>; export type ValidatorThrowers = { [P in (string & keyof T)]: T[P] extends ValidationGenericLike ? ValidationThrower : never; }; export declare function createThrower(schema: ValidationGenericLike): ValidationThrower; export declare function createThrowers(validators: T): ValidatorThrowers;