import { Either } from './utils'; export declare class ValidationErrors extends Error { readonly errors: string[]; constructor(errors: string[]); } export declare type DirtyEnvConfig = Partial>; declare type ValidatorFunction = (value: string) => Either; export declare type Validator = { default?: T; validate: ValidatorFunction; }; export declare const validator: (validator: Validator) => Validator; export declare type Validators = { [P in keyof C]: Validator; }; export declare const validated: (validators: Validators, parse: (env: C) => R) => (dirtyEnv: Partial>) => ValidationErrors | R; export declare const noValidation: () => ValidatorFunction; export declare const validateListOfValues: (allowedValues: readonly T[]) => ValidatorFunction; export declare const validateRegExp: (regex: RegExp) => ValidatorFunction; export declare const validateYesNo: () => ValidatorFunction; export declare const validateNumber: (min: number, max: number) => ValidatorFunction; export declare const validateFileReadable: () => ValidatorFunction; export {};