import { Predicate } from './Predicate.js'; export interface HasLength { length: number; } /** * @desc Ensures that the `value` is of `expectedLength`. * Applies to {@link String}s, {@link Array}s and anything that has a `.length` property. * * This function is an alias for to `property('length', isDefined(), isEqualTo(expectedLength))` * * @example Array * import { ensure, hasLengthOf, TinyType } from 'tiny-types'; * * class Tuple extends TinyType { * constructor(public readonly values: any[]) { * super(); * ensure('Tuple', values, hasLengthOf(2)); * } * } * * @example String * import { ensure, hasLengthOf, TinyType } from 'tiny-types'; * * class Username extends TinyType { * constructor(public readonly value: string) { * super(); * ensure('Username', value, hasLengthOf(8)); * } * } * * @param {number} expectedLength * @returns {Predicate} */ export declare function hasLengthOf(expectedLength: number): Predicate; //# sourceMappingURL=hasLengthOf.d.ts.map