import { Either } from '../adts/Either'; import { Maybe } from '../adts/Maybe'; export declare type Validator = (value: T) => boolean; export declare type ValidationTuple = [Validator, Err]; export declare abstract class Validate { static all(value: T, validations: ValidationTuple[]): Either; static untilError(value: T, validations: ValidationTuple[]): Either; } export declare const ifEmpty: (value: string) => boolean; export declare const ifJust: (value: Maybe) => boolean; export declare const ifNothing: (value: Maybe) => boolean; export declare const ifShorterThan: (length: number) => (value: string) => boolean; export declare const ifLongerThan: (length: number) => (value: string) => boolean; export declare const ifLengthIs: (length: number) => (value: string) => boolean; export declare const ifSubstringOf: (str: string) => (value: string) => boolean; export declare const ifContains: (substr: string) => (value: string) => boolean; export declare const ifEmptyList: (arr: ArrayLike) => boolean; export declare const ifEqualTo: (other: T) => (value: T) => boolean; export declare const ifTrue: (condition: Validator) => (value: T) => boolean; export declare const ifFalse: (condition: Validator) => (value: T) => boolean; export declare const not: (validation: Validator) => Validator; export declare const or: (validation1: Validator, validation2: Validator) => Validator; export declare const and: (validation1: Validator, validation2: Validator) => Validator;