type ValidationKey = string | symbol | number; interface ValidationError { key: TValidationKeys; message: string; } type Validator = [TValidationKeys, ValidatorFunc]; type ValidatorFunc = () => string | null | Promise; /** * Gets a validation error for a key. * @param key The key of the error to get. * @param errors The list of errors. * @returns The error for the given key, or null if there is no error. */ declare function getError(key: TValidationKeys, errors: ValidationError[]): string | null; /** * Runs the validation using all provided validators. * @param validators The list of validators. * @returns A list of validation errors. */ declare function runValidation(...validators: Validator[]): Promise[]>; export type { ValidationError, ValidationKey, Validator, ValidatorFunc }; export { getError, runValidation };