import RuntimeTypeErrorItem from './errorReporting/RuntimeTypeErrorItem'; import Type from './types/Type'; import Validation, { IdentifierPath } from './Validation'; export declare type TypeConstraint = (input: T) => string | null | undefined; export declare type ConstrainableType = Type & { constraints: TypeConstraint[]; }; /** * Collect any errors from constraints on the given subject type. */ export declare function collectConstraintErrors(subject: ConstrainableType, validation: Validation, path: IdentifierPath, input: any): Iterable; /** * Determine whether the input passes the constraints on the subject type. */ export declare function constraintsAccept(subject: ConstrainableType, ...input: any[]): boolean;