import { AbstractValidator } from '../types'; import type { InferInput, InferValidation, Validation, ValidationOptions, Validator } from '../types'; export type OneOfArguments = readonly Validation[]; export type InferOneOfValidation = A extends readonly [infer First, ...infer Rest] ? First extends Validation ? Rest extends OneOfArguments ? InferValidation | InferOneOfValidation : InferValidation : never : A extends readonly (infer Type)[] ? Type extends Validation ? InferValidation : never : never; export type InferOneOfInput = A extends readonly [infer First, ...infer Rest] ? First extends Validation ? Rest extends OneOfArguments ? InferInput | InferOneOfInput : InferInput : never : A extends readonly (infer Type)[] ? Type extends Validation ? InferInput : never : never; /** A `Validator` validating a value as _one of_ the specified arguments. */ export declare class OneOfValidator extends AbstractValidator, InferOneOfInput> { readonly validators: readonly Validator[]; constructor(args: A); validate(value: unknown, options?: ValidationOptions): InferOneOfValidation; } /** Validate a value as _one of_ the specified arguments */ export declare function oneOf(...args: A): OneOfValidator; export type AllOfArguments = readonly [Validation, ...Validation[]]; export type InferAllOfValidation = A extends readonly [infer First, ...infer Rest] ? First extends Validation ? Rest extends AllOfArguments ? InferValidation & InferAllOfValidation : InferValidation : never : never; export type InferAllOfInput = A extends readonly [infer First, ...infer Rest] ? First extends Validation ? Rest extends AllOfArguments ? InferInput & InferAllOfInput : InferInput : never : never; /** A `Validator` validating a value as _all of_ the specified arguments. */ export declare class AllOfValidator extends AbstractValidator, InferAllOfInput> { readonly validators: readonly Validator[]; constructor(args: A); validate(value: unknown, options?: ValidationOptions): InferAllOfValidation; } /** Validate a value as _all of_ the specified arguments */ export declare function allOf(...args: A): AllOfValidator;