import { AbstractControl, AsyncValidatorFn, Validator, ValidatorFn } from "@angular/forms"; /** Defines a client side validation result. */ export interface ValidationResult { [validator: string]: string | boolean; } /** Array of asyncronous validator functions. */ export declare type AsyncValidatorArray = Array; /** Array of syncronous simple validators. */ export declare type ValidatorArray = Array; /** * Combines both sync and async validators as one array. * TODO: Why? Go thorough. */ export declare const composeValidators: (validators: (Validator | ValidatorFn)[]) => AsyncValidatorFn | ValidatorFn; /** Single method to run validations on a control. */ export declare const validate: (validators: (Validator | ValidatorFn)[], asyncValidators: (Validator | AsyncValidatorFn)[]) => (control: AbstractControl) => any; /** Temporary implementation of validation messages. */ export declare const message: (validator: ValidationResult, key: string) => string;