import { Predicate } from './predicates/index.js';
/**
* @desc The `ensure` function verifies if the value meets the specified {Predicate}s.
*
* @example
Basic usage
* import { ensure, isDefined } from 'tiny-types'
*
* const username = 'jan-molak'
* ensure('Username', username, isDefined());
*
* @example Ensuring validity of a domain object upon creation
* import { TinyType, ensure, isDefined, isInteger, isInRange } from 'tiny-types'
*
* class Age extends TinyType {
* constructor(public readonly value: number) {
* ensure('Age', value, isDefined(), isInteger(), isInRange(0, 125));
* }
* }
*
* @param {string} name - the name of the value to check.
* This name will be included in the error message should the check fail
* @param {T} value - the argument to check
* @param {...Array>} predicates - a list of predicates to check the value against
* @returns {T} - if the original value passes all the predicates, it's returned from the function
*/
export declare function ensure(name: string, value: T, ...predicates: Array>): T;
//# sourceMappingURL=ensure.d.ts.map