import { Boxed, ValidationErrors } from 'pure-forms'; export interface EqualToValidationError { comparand: T; actual: T; } declare module 'pure-forms/src/state' { interface ValidationErrors { equalTo?: EqualToValidationError; } } /** * A validation function that requires the value to be strictly equal (i.e. `===`) * to another value. * * The validation error returned by this validation function has the following shape: * * ```typescript * { * equalTo: { * comparand: T; * actual: T; * }; * } * ``` * * Usually you would use this validation function in conjunction with the `validate` * update function to perform synchronous validation in your reducer: * * ```typescript * updateGroup({ * name: validate(equalTo('John Doe')), * }) * ``` */ export declare function equalTo(comparand: T): = T>(value: TV) => ValidationErrors;