import { Failure } from '../base'; import { Validator, ValidatorOptions } from './validator'; import { ValidatorBase, ValidatorBaseConstructorParams } from './validatorBase'; /** * Parameters used to construct a {@link Validation.Classes.ArrayValidator | ArrayValidator}. * @public */ export interface ArrayValidatorConstructorParams extends ValidatorBaseConstructorParams { validateElement: Validator; } /** * An in-place {@link Validator | Validator} for arrays of validated * values or objects. * @public */ export declare class ArrayValidator extends ValidatorBase { /** * {@link Validation.ValidatorOptions | Options} which apply to this * validator. */ readonly options: ValidatorOptions; protected readonly _validateElement: Validator; /** * Constructs a new {@link Validation.Classes.ArrayValidator | ArrayValidator}. * @param params - Optional {@link Validation.Classes.ArrayValidatorConstructorParams | init params} for the * new {@link Validation.Classes.ArrayValidator | ArrayValidator}. */ constructor(params: ArrayValidatorConstructorParams); /** * Static method which validates that a supplied `unknown` value is a `array` * and that every element of the array can be validated by the supplied array * validator. * @param from - The `unknown` value to be tested. * @param context - Optional validation context will be propagated to element validator. * @param self - Optional self-reference for recursive validation. * @returns Returns `true` if `from` is an `array` of valid elements, or * {@link Failure} with an error message if not. */ protected _validate(from: unknown, context?: TC, self?: Validator): boolean | Failure; } //# sourceMappingURL=array.d.ts.map