import { AbstractControlState, FormState, ValidationErrors } from '../state'; export declare type ValidationFn = (value: TValue) => ValidationErrors; /** * This update function takes one or more validation functions and a form * state and sets the errors of the state to the result of applying the * given validation function(s) to the state's value. */ export declare function validate(state: AbstractControlState, fn: ValidationFn, ...rest: ValidationFn[]): FormState; /** * This update function takes an array of validation functions and a form * state and sets the errors of the state to the result of applying the given * validation function(s) to the state's value. */ export declare function validate(state: AbstractControlState, rest: ValidationFn[]): FormState; /** * This update function takes one or more validation functions and returns * a projection function that sets the errors of a form state to the result * of applying the given validation function(s) to the state's value. */ export declare function validate(fn: ValidationFn, ...rest: ValidationFn[]): (state: AbstractControlState) => FormState; /** * This update function takes an array of validation functions and returns a * projection function that sets the errors of a form state to the result of * applying the given validation function(s) to the state's value. */ export declare function validate(rest: ValidationFn[]): (state: AbstractControlState) => FormState;