UNPKG

tiny-types

Version:

A tiny library that brings Tiny Types to JavaScript and TypeScript

18 lines (17 loc) 546 B
import { Predicate } from './Predicate'; /** * @desc Ensures that the `value` is less than or equal to the `upperBound`. * * @example * import { ensure, isLessThanOrEqualTo, TinyType } from 'tiny-types'; * * class InvestmentPeriod extends TinyType { * constructor(public readonly value: number) { * ensure('InvestmentPeriod', value, isLessThanOrEqualTo(50)); * } * } * * @param {number} upperBound * @returns {Predicate<number>} */ export declare function isLessThanOrEqualTo(upperBound: number): Predicate<number>;