1 | import { Predicate, type PredicateOptions } from './predicate.js';
|
2 | export declare class NumberPredicate extends Predicate<number> {
|
3 | |
4 |
|
5 |
|
6 | constructor(options?: PredicateOptions);
|
7 | /**
|
8 | Test a number to be in a specified range.
|
9 |
|
10 | @param start - Start of the range.
|
11 | @param end - End of the range.
|
12 | */
|
13 | inRange(start: number, end: number): this;
|
14 | /**
|
15 | Test a number to be greater than the provided value.
|
16 |
|
17 | @param number - Minimum value.
|
18 | */
|
19 | greaterThan(number: number): this;
|
20 | /**
|
21 | Test a number to be greater than or equal to the provided value.
|
22 |
|
23 | @param number - Minimum value.
|
24 | */
|
25 | greaterThanOrEqual(number: number): this;
|
26 | /**
|
27 | Test a number to be less than the provided value.
|
28 |
|
29 | @param number - Maximum value.
|
30 | */
|
31 | lessThan(number: number): this;
|
32 | /**
|
33 | Test a number to be less than or equal to the provided value.
|
34 |
|
35 | @param number - Minimum value.
|
36 | */
|
37 | lessThanOrEqual(number: number): this;
|
38 | /**
|
39 | Test a number to be equal to a specified number.
|
40 |
|
41 | @param expected - Expected value to match.
|
42 | */
|
43 | equal(expected: number): this;
|
44 | /**
|
45 | Test if a number is an element of the provided list.
|
46 |
|
47 | @param list - List of possible values.
|
48 | */
|
49 | oneOf(list: readonly number[]): this;
|
50 | /**
|
51 | Test a number to be an integer.
|
52 | */
|
53 | get integer(): this;
|
54 | /**
|
55 | Test a number to be finite.
|
56 | */
|
57 | get finite(): this;
|
58 | /**
|
59 | Test a number to be infinite.
|
60 | */
|
61 | get infinite(): this;
|
62 | /**
|
63 | Test a number to be positive.
|
64 | */
|
65 | get positive(): this;
|
66 | /**
|
67 | Test a number to be negative.
|
68 | */
|
69 | get negative(): this;
|
70 | /**
|
71 | Test a number to be an integer or infinite.
|
72 | */
|
73 | get integerOrInfinite(): this;
|
74 | /**
|
75 | Test a number to be in a valid range for a 8-bit unsigned integer.
|
76 | */
|
77 | get uint8(): this;
|
78 | /**
|
79 | Test a number to be in a valid range for a 16-bit unsigned integer.
|
80 | */
|
81 | get uint16(): this;
|
82 | /**
|
83 | Test a number to be in a valid range for a 32-bit unsigned integer.
|
84 | */
|
85 | get uint32(): this;
|
86 | /**
|
87 | Test a number to be in a valid range for a 8-bit signed integer.
|
88 | */
|
89 | get int8(): this;
|
90 | /**
|
91 | Test a number to be in a valid range for a 16-bit signed integer.
|
92 | */
|
93 | get int16(): this;
|
94 | /**
|
95 | Test a number to be in a valid range for a 32-bit signed integer.
|
96 | */
|
97 | get int32(): this;
|
98 | }
|