import Registry from '../../Registry'; import { AllFieldsAssertion } from './AllFieldsAssertion'; declare module "../../Builder" { /** * @assertion .allFieldsThat(assert : InnerExpression); * * Checks if values of all fields of an object satisfy an assertion * implemented in provided `callback`. * * Message produced by this assertion contains only the information on fields * which did not satisfy the assertion. This is unusual but it makes no sense * to list 100 fields in error message when only one did not satisfy the assertion. * * ## Example * * ``` * // Checks if arg is an object and contains only boolean values. * contract(arg, 'arg') * .has.allFieldsThat(elem => elem.is.aBoolean) * ; * ``` * * @author Maciej Chałapuk (maciej@chalapuk.pl) */ interface AssertionBuilder { allFieldsThat(assert: InnerExpression): OperatorBuilder; allFieldsWhich(assert: InnerExpression): OperatorBuilder; onlyFieldsThat(assert: InnerExpression): OperatorBuilder; onlyFieldsWhich(assert: InnerExpression): OperatorBuilder; eachFieldIs(assert: InnerExpression): OperatorBuilder; everyFieldIs(assert: InnerExpression): OperatorBuilder; } } export { AllFieldsAssertion }; export default AllFieldsAssertion; /** * @author Maciej Chałapuk (maciej@chalapuk.pl) */ export declare function registerIn(registry: Registry): void;