@augment-vir/assert 30.8.4 → 31.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assertions/boolean.d.ts +20 -26
- package/dist/assertions/boolean.js +185 -41
- package/dist/assertions/boundary.d.ts +40 -256
- package/dist/assertions/boundary.js +265 -229
- package/dist/assertions/enum.d.ts +12 -13
- package/dist/assertions/enum.js +98 -20
- package/dist/assertions/equality/entry-equality.d.ts +11 -15
- package/dist/assertions/equality/entry-equality.js +210 -43
- package/dist/assertions/equality/json-equality.d.ts +11 -15
- package/dist/assertions/equality/json-equality.js +144 -43
- package/dist/assertions/equality/simple-equality.d.ts +39 -46
- package/dist/assertions/equality/simple-equality.js +316 -61
- package/dist/assertions/extendable-assertions.d.ts +0 -12
- package/dist/assertions/extendable-assertions.js +0 -12
- package/dist/assertions/http.d.ts +10 -14
- package/dist/assertions/http.js +96 -28
- package/dist/assertions/instance.d.ts +10 -18
- package/dist/assertions/instance.js +92 -26
- package/dist/assertions/keys.d.ts +59 -138
- package/dist/assertions/keys.js +279 -163
- package/dist/assertions/length.d.ts +30 -212
- package/dist/assertions/length.js +117 -175
- package/dist/assertions/nullish.d.ts +8 -20
- package/dist/assertions/nullish.js +85 -27
- package/dist/assertions/numeric.d.ts +67 -81
- package/dist/assertions/numeric.js +564 -133
- package/dist/assertions/output.d.ts +2 -3
- package/dist/assertions/output.js +1 -7
- package/dist/assertions/primitive.d.ts +33 -40
- package/dist/assertions/primitive.js +232 -66
- package/dist/assertions/promise.d.ts +20 -30
- package/dist/assertions/promise.js +244 -53
- package/dist/assertions/regexp.d.ts +12 -14
- package/dist/assertions/regexp.js +84 -21
- package/dist/assertions/runtime-type.d.ts +99 -207
- package/dist/assertions/runtime-type.js +805 -276
- package/dist/assertions/throws.d.ts +24 -25
- package/dist/assertions/throws.js +43 -5
- package/dist/assertions/uuid.d.ts +11 -16
- package/dist/assertions/uuid.js +91 -22
- package/dist/assertions/values.d.ts +81 -210
- package/dist/assertions/values.js +627 -234
- package/dist/augments/assertion-exports.d.ts +0 -1
- package/dist/augments/assertion-exports.js +1 -1
- package/dist/augments/guards/assert-wrap.d.ts +7 -4
- package/dist/augments/guards/assert-wrap.js +5 -4
- package/dist/augments/guards/check-wrap.d.ts +7 -5
- package/dist/augments/guards/check-wrap.js +5 -4
- package/dist/augments/guards/check.d.ts +5 -5
- package/dist/augments/guards/check.js +5 -4
- package/dist/augments/guards/wait-until.d.ts +8 -4
- package/dist/augments/guards/wait-until.js +7 -8
- package/dist/guard-types/guard-group.d.ts +5 -2
- package/dist/guard-types/wait-until-function.d.ts +2 -10
- package/dist/guard-types/wait-until-function.js +1 -9
- package/dist/index.d.ts +1 -0
- package/package.json +2 -2
- package/dist/guard-types/assert-wrap-function.d.ts +0 -12
- package/dist/guard-types/assert-wrap-function.js +0 -14
- package/dist/guard-types/check-function.d.ts +0 -14
- package/dist/guard-types/check-function.js +0 -22
- package/dist/guard-types/check-wrap-wrapper-function.d.ts +0 -12
- package/dist/guard-types/check-wrap-wrapper-function.js +0 -19
- package/dist/guard-types/guard-override.d.ts +0 -4
- package/dist/guard-types/guard-override.js +0 -10
|
@@ -1,18 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
declare function isAbove(actual: number, expected: number, failureMessage?: string | undefined): void;
|
|
4
|
-
declare function isAtLeast(actual: number, expected: number, failureMessage?: string | undefined): void;
|
|
5
|
-
declare function isInBounds(actual: number, { max, min }: MinMax, failureMessage?: string | undefined): void;
|
|
6
|
-
declare function isOutBounds(actual: number, { min, max }: MinMax, failureMessage?: string | undefined): void;
|
|
7
|
-
declare function isInteger(actual: number, failureMessage?: string | undefined): void;
|
|
8
|
-
declare function isNotInteger(actual: number, failureMessage?: string | undefined): void;
|
|
9
|
-
declare function isBelow(actual: number, expected: number, failureMessage?: string | undefined): void;
|
|
10
|
-
declare function isAtMost(actual: number, expected: number, failureMessage?: string | undefined): void;
|
|
11
|
-
declare function isNaNGuard(actual: number, failureMessage?: string | undefined): void;
|
|
12
|
-
declare function isFiniteGuard(actual: number, failureMessage?: string | undefined): void;
|
|
13
|
-
declare function isInfinite(actual: number, failureMessage?: string | undefined): void;
|
|
14
|
-
declare function isApproximately(actual: number, expected: number, delta: number, failureMessage?: string | undefined): void;
|
|
15
|
-
declare function isNotApproximately(actual: number, expected: number, delta: number, failureMessage?: string | undefined): void;
|
|
1
|
+
import { MaybePromise, MinMax } from '@augment-vir/core';
|
|
2
|
+
import { WaitUntilOptions } from '../guard-types/wait-until-function.js';
|
|
16
3
|
export declare const numericGuards: {
|
|
17
4
|
assert: {
|
|
18
5
|
/**
|
|
@@ -35,7 +22,7 @@ export declare const numericGuards: {
|
|
|
35
22
|
* @see
|
|
36
23
|
* - {@link assert.isOutBounds} : the opposite assertion.
|
|
37
24
|
*/
|
|
38
|
-
isInBounds:
|
|
25
|
+
isInBounds(this: void, actual: number, { max, min }: MinMax, failureMessage?: string | undefined): void;
|
|
39
26
|
/**
|
|
40
27
|
* Asserts that a number is outside the provided min and max bounds, exclusive.
|
|
41
28
|
*
|
|
@@ -56,7 +43,7 @@ export declare const numericGuards: {
|
|
|
56
43
|
* @see
|
|
57
44
|
* - {@link assert.isInBounds} : the opposite assertion.
|
|
58
45
|
*/
|
|
59
|
-
isOutBounds:
|
|
46
|
+
isOutBounds(this: void, actual: number, { min, max }: MinMax, failureMessage?: string | undefined): void;
|
|
60
47
|
/**
|
|
61
48
|
* Asserts that a number is an integer. This has the same limitations as
|
|
62
49
|
* https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger.
|
|
@@ -78,7 +65,7 @@ export declare const numericGuards: {
|
|
|
78
65
|
* @see
|
|
79
66
|
* - {@link assert.isNotInteger} : the opposite assertion.
|
|
80
67
|
*/
|
|
81
|
-
isInteger:
|
|
68
|
+
isInteger(this: void, actual: number, failureMessage?: string | undefined): void;
|
|
82
69
|
/**
|
|
83
70
|
* Asserts that a number is not an integer. This has the same limitations, as
|
|
84
71
|
* https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger.
|
|
@@ -100,7 +87,7 @@ export declare const numericGuards: {
|
|
|
100
87
|
* @see
|
|
101
88
|
* - {@link assert.isInteger} : the opposite assertion.
|
|
102
89
|
*/
|
|
103
|
-
isNotInteger:
|
|
90
|
+
isNotInteger(this: void, actual: number, failureMessage?: string | undefined): void;
|
|
104
91
|
/**
|
|
105
92
|
* Asserts that a number is above the expectation (`actual > expected`).
|
|
106
93
|
*
|
|
@@ -121,7 +108,7 @@ export declare const numericGuards: {
|
|
|
121
108
|
* - {@link assert.isBelow} : the opposite assertion.
|
|
122
109
|
* - {@link assert.isAtLeast} : the more lenient assertion.
|
|
123
110
|
*/
|
|
124
|
-
isAbove:
|
|
111
|
+
isAbove(this: void, actual: number, expected: number, failureMessage?: string | undefined): void;
|
|
125
112
|
/**
|
|
126
113
|
* Asserts that a number is at least the expectation (`actual >= expected`).
|
|
127
114
|
*
|
|
@@ -142,7 +129,7 @@ export declare const numericGuards: {
|
|
|
142
129
|
* - {@link assert.isAtMost} : the opposite assertion.
|
|
143
130
|
* - {@link assert.isAbove} : the more restrictive assertion.
|
|
144
131
|
*/
|
|
145
|
-
isAtLeast:
|
|
132
|
+
isAtLeast(this: void, actual: number, expected: number, failureMessage?: string | undefined): void;
|
|
146
133
|
/**
|
|
147
134
|
* Asserts that a number is below the expectation (`actual < expected`).
|
|
148
135
|
*
|
|
@@ -163,7 +150,7 @@ export declare const numericGuards: {
|
|
|
163
150
|
* - {@link assert.isAbove} : the opposite assertion.
|
|
164
151
|
* - {@link assert.isAtMost} : the more lenient assertion.
|
|
165
152
|
*/
|
|
166
|
-
isBelow:
|
|
153
|
+
isBelow(this: void, actual: number, expected: number, failureMessage?: string | undefined): void;
|
|
167
154
|
/**
|
|
168
155
|
* Asserts that a number is at most the expectation (`actual <= expected`).
|
|
169
156
|
*
|
|
@@ -184,7 +171,7 @@ export declare const numericGuards: {
|
|
|
184
171
|
* - {@link assert.isAtLeast} : the opposite assertion.
|
|
185
172
|
* - {@link assert.isBelow} : the more restrictive assertion.
|
|
186
173
|
*/
|
|
187
|
-
isAtMost:
|
|
174
|
+
isAtMost(this: void, actual: number, expected: number, failureMessage?: string | undefined): void;
|
|
188
175
|
/**
|
|
189
176
|
* Asserts that a number is
|
|
190
177
|
* [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/NaN).
|
|
@@ -205,7 +192,7 @@ export declare const numericGuards: {
|
|
|
205
192
|
* @see
|
|
206
193
|
* - {@link assert.isNumber} : can be used as the opposite assertion.
|
|
207
194
|
*/
|
|
208
|
-
isNaN:
|
|
195
|
+
isNaN(this: void, actual: number, failureMessage?: string | undefined): void;
|
|
209
196
|
/**
|
|
210
197
|
* Asserts that a number is finite: meaning, not `NaN` and not `Infinity` or `-Infinity`.
|
|
211
198
|
*
|
|
@@ -227,7 +214,7 @@ export declare const numericGuards: {
|
|
|
227
214
|
* - {@link assert.isNaN} : an opposite assertion.
|
|
228
215
|
* - {@link assert.isInfinite} : an opposite assertion.
|
|
229
216
|
*/
|
|
230
|
-
isFinite:
|
|
217
|
+
isFinite(this: void, actual: number, failureMessage?: string | undefined): void;
|
|
231
218
|
/**
|
|
232
219
|
* Asserts that a number is either `Infinity` or `-Infinity`.
|
|
233
220
|
*
|
|
@@ -249,7 +236,7 @@ export declare const numericGuards: {
|
|
|
249
236
|
* - {@link assert.isNaN} : an opposite assertion.
|
|
250
237
|
* - {@link assert.isInfinite} : an opposite assertion.
|
|
251
238
|
*/
|
|
252
|
-
isInfinite:
|
|
239
|
+
isInfinite(this: void, actual: number, failureMessage?: string | undefined): void;
|
|
253
240
|
/**
|
|
254
241
|
* Asserts that a number is within ±`delta` of the expectation.
|
|
255
242
|
*
|
|
@@ -270,7 +257,7 @@ export declare const numericGuards: {
|
|
|
270
257
|
* @see
|
|
271
258
|
* - {@link assert.isNotApproximately} : the opposite assertion.
|
|
272
259
|
*/
|
|
273
|
-
isApproximately:
|
|
260
|
+
isApproximately(this: void, actual: number, expected: number, delta: number, failureMessage?: string | undefined): void;
|
|
274
261
|
/**
|
|
275
262
|
* Asserts that a number is outside ±`delta` of the expectation.
|
|
276
263
|
*
|
|
@@ -291,7 +278,7 @@ export declare const numericGuards: {
|
|
|
291
278
|
* @see
|
|
292
279
|
* - {@link assert.isApproximately} : the opposite assertion.
|
|
293
280
|
*/
|
|
294
|
-
isNotApproximately:
|
|
281
|
+
isNotApproximately(this: void, actual: number, expected: number, delta: number, failureMessage?: string | undefined): void;
|
|
295
282
|
};
|
|
296
283
|
check: {
|
|
297
284
|
/**
|
|
@@ -313,7 +300,7 @@ export declare const numericGuards: {
|
|
|
313
300
|
* @see
|
|
314
301
|
* - {@link check.isOutBounds} : the opposite check.
|
|
315
302
|
*/
|
|
316
|
-
isInBounds:
|
|
303
|
+
isInBounds(this: void, actual: number, { max, min }: MinMax): boolean;
|
|
317
304
|
/**
|
|
318
305
|
* Checks that a number is outside the provided min and max bounds, exclusive.
|
|
319
306
|
*
|
|
@@ -333,7 +320,7 @@ export declare const numericGuards: {
|
|
|
333
320
|
* @see
|
|
334
321
|
* - {@link check.isInBounds} : the opposite check.
|
|
335
322
|
*/
|
|
336
|
-
isOutBounds:
|
|
323
|
+
isOutBounds(this: void, actual: number, { max, min }: MinMax): boolean;
|
|
337
324
|
/**
|
|
338
325
|
* Checks that a number is an integer. This has the same limitations as
|
|
339
326
|
* https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger.
|
|
@@ -354,7 +341,7 @@ export declare const numericGuards: {
|
|
|
354
341
|
* @see
|
|
355
342
|
* - {@link check.isNotInteger} : the opposite check.
|
|
356
343
|
*/
|
|
357
|
-
isInteger:
|
|
344
|
+
isInteger(this: void, actual: number): boolean;
|
|
358
345
|
/**
|
|
359
346
|
* Checks that a number is not an integer. This has the same limitations, as
|
|
360
347
|
* https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger.
|
|
@@ -375,7 +362,7 @@ export declare const numericGuards: {
|
|
|
375
362
|
* @see
|
|
376
363
|
* - {@link check.isInteger} : the opposite check.
|
|
377
364
|
*/
|
|
378
|
-
isNotInteger:
|
|
365
|
+
isNotInteger(this: void, actual: number): boolean;
|
|
379
366
|
/**
|
|
380
367
|
* Checks that a number is above the expectation (`actual > expected`).
|
|
381
368
|
*
|
|
@@ -395,7 +382,7 @@ export declare const numericGuards: {
|
|
|
395
382
|
* - {@link check.isBelow} : the opposite check.
|
|
396
383
|
* - {@link check.isAtLeast} : the more lenient check.
|
|
397
384
|
*/
|
|
398
|
-
isAbove:
|
|
385
|
+
isAbove(this: void, actual: number, expected: number): boolean;
|
|
399
386
|
/**
|
|
400
387
|
* Checks that a number is at least the expectation (`actual >= expected`).
|
|
401
388
|
*
|
|
@@ -415,7 +402,7 @@ export declare const numericGuards: {
|
|
|
415
402
|
* - {@link check.isAtMost} : the opposite check.
|
|
416
403
|
* - {@link check.isAbove} : the more restrictive check.
|
|
417
404
|
*/
|
|
418
|
-
isAtLeast:
|
|
405
|
+
isAtLeast(this: void, actual: number, expected: number): boolean;
|
|
419
406
|
/**
|
|
420
407
|
* Checks that a number is below the expectation (`actual < expected`).
|
|
421
408
|
*
|
|
@@ -435,7 +422,7 @@ export declare const numericGuards: {
|
|
|
435
422
|
* - {@link check.isAbove} : the opposite check.
|
|
436
423
|
* - {@link check.isAtMost} : the more lenient check.
|
|
437
424
|
*/
|
|
438
|
-
isBelow:
|
|
425
|
+
isBelow(this: void, actual: number, expected: number): boolean;
|
|
439
426
|
/**
|
|
440
427
|
* Checks that a number is at most the expectation (`actual <= expected`).
|
|
441
428
|
*
|
|
@@ -455,7 +442,7 @@ export declare const numericGuards: {
|
|
|
455
442
|
* - {@link check.isAtLeast} : the opposite check.
|
|
456
443
|
* - {@link check.isBelow} : the more restrictive check.
|
|
457
444
|
*/
|
|
458
|
-
isAtMost:
|
|
445
|
+
isAtMost(this: void, actual: number, expected: number): boolean;
|
|
459
446
|
/**
|
|
460
447
|
* Checks that a number is
|
|
461
448
|
* [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/NaN).
|
|
@@ -475,7 +462,7 @@ export declare const numericGuards: {
|
|
|
475
462
|
* @see
|
|
476
463
|
* - {@link check.isNumber} : can be used as the opposite check.
|
|
477
464
|
*/
|
|
478
|
-
isNaN:
|
|
465
|
+
isNaN(this: void, input: number): boolean;
|
|
479
466
|
/**
|
|
480
467
|
* Checks that a number is finite: meaning, not `NaN` and not `Infinity` or `-Infinity`.
|
|
481
468
|
*
|
|
@@ -496,7 +483,7 @@ export declare const numericGuards: {
|
|
|
496
483
|
* - {@link check.isNaN} : an opposite check.
|
|
497
484
|
* - {@link check.isInfinite} : an opposite check.
|
|
498
485
|
*/
|
|
499
|
-
isFinite:
|
|
486
|
+
isFinite(this: void, actual: number): boolean;
|
|
500
487
|
/**
|
|
501
488
|
* Checks that a number is either `Infinity` or `-Infinity`.
|
|
502
489
|
*
|
|
@@ -517,7 +504,7 @@ export declare const numericGuards: {
|
|
|
517
504
|
* - {@link check.isNaN} : an opposite check.
|
|
518
505
|
* - {@link check.isInfinite} : an opposite check.
|
|
519
506
|
*/
|
|
520
|
-
isInfinite:
|
|
507
|
+
isInfinite(this: void, actual: number): boolean;
|
|
521
508
|
/**
|
|
522
509
|
* Checks that a number is within ±`delta` of the expectation.
|
|
523
510
|
*
|
|
@@ -537,7 +524,7 @@ export declare const numericGuards: {
|
|
|
537
524
|
* @see
|
|
538
525
|
* - {@link check.isNotApproximately} : the opposite check.
|
|
539
526
|
*/
|
|
540
|
-
isApproximately:
|
|
527
|
+
isApproximately(this: void, actual: number, expected: number, delta: number): boolean;
|
|
541
528
|
/**
|
|
542
529
|
* Checks that a number is outside ±`delta` of the expectation.
|
|
543
530
|
*
|
|
@@ -557,7 +544,7 @@ export declare const numericGuards: {
|
|
|
557
544
|
* @see
|
|
558
545
|
* - {@link check.isApproximately} : the opposite check.
|
|
559
546
|
*/
|
|
560
|
-
isNotApproximately:
|
|
547
|
+
isNotApproximately(this: void, actual: number, expected: number, delta: number): boolean;
|
|
561
548
|
};
|
|
562
549
|
assertWrap: {
|
|
563
550
|
/**
|
|
@@ -581,7 +568,7 @@ export declare const numericGuards: {
|
|
|
581
568
|
* @see
|
|
582
569
|
* - {@link assertWrap.isOutBounds} : the opposite assertion.
|
|
583
570
|
*/
|
|
584
|
-
isInBounds:
|
|
571
|
+
isInBounds<Actual extends number>(this: void, actual: Actual, { max, min }: MinMax, failureMessage?: string | undefined): Actual;
|
|
585
572
|
/**
|
|
586
573
|
* Asserts that a number is outside the provided min and max bounds, exclusive. Returns the
|
|
587
574
|
* number if the assertion passes.
|
|
@@ -603,7 +590,7 @@ export declare const numericGuards: {
|
|
|
603
590
|
* @see
|
|
604
591
|
* - {@link assertWrap.isInBounds} : the opposite assertion.
|
|
605
592
|
*/
|
|
606
|
-
isOutBounds:
|
|
593
|
+
isOutBounds<Actual extends number>(this: void, actual: Actual, { min, max }: MinMax, failureMessage?: string | undefined): Actual;
|
|
607
594
|
/**
|
|
608
595
|
* Asserts that a number is an integer. Returns the number if the assertion passes. This has
|
|
609
596
|
* the same limitations as
|
|
@@ -626,7 +613,7 @@ export declare const numericGuards: {
|
|
|
626
613
|
* @see
|
|
627
614
|
* - {@link assertWrap.isNotInteger} : the opposite assertion.
|
|
628
615
|
*/
|
|
629
|
-
isInteger:
|
|
616
|
+
isInteger<Actual extends number>(this: void, actual: Actual, failureMessage?: string | undefined): Actual;
|
|
630
617
|
/**
|
|
631
618
|
* Asserts that a number is not an integer. Returns the number if the assertion passes. This
|
|
632
619
|
* has the same limitations, as
|
|
@@ -649,7 +636,7 @@ export declare const numericGuards: {
|
|
|
649
636
|
* @see
|
|
650
637
|
* - {@link assertWrap.isInteger} : the opposite assertion.
|
|
651
638
|
*/
|
|
652
|
-
isNotInteger:
|
|
639
|
+
isNotInteger<Actual extends number>(this: void, actual: Actual, failureMessage?: string | undefined): Actual;
|
|
653
640
|
/**
|
|
654
641
|
* Asserts that a number is above the expectation (`actual > expected`). Returns the number
|
|
655
642
|
* if the assertion passes.
|
|
@@ -672,7 +659,7 @@ export declare const numericGuards: {
|
|
|
672
659
|
* - {@link assertWrap.isBelow} : the opposite assertion.
|
|
673
660
|
* - {@link assertWrap.isAtLeast} : the more lenient assertion.
|
|
674
661
|
*/
|
|
675
|
-
isAbove:
|
|
662
|
+
isAbove<Actual extends number>(this: void, actual: Actual, expected: number, failureMessage?: string | undefined): Actual;
|
|
676
663
|
/**
|
|
677
664
|
* Asserts that a number is at least the expectation (`actual >= expected`). Returns the
|
|
678
665
|
* number if the assertion passes.
|
|
@@ -695,7 +682,7 @@ export declare const numericGuards: {
|
|
|
695
682
|
* - {@link assertWrap.isAtMost} : the opposite assertion.
|
|
696
683
|
* - {@link assertWrap.isAbove} : the more restrictive assertion.
|
|
697
684
|
*/
|
|
698
|
-
isAtLeast:
|
|
685
|
+
isAtLeast<Actual extends number>(this: void, actual: Actual, expected: number, failureMessage?: string | undefined): Actual;
|
|
699
686
|
/**
|
|
700
687
|
* Asserts that a number is below the expectation (`actual < expected`). Returns the number
|
|
701
688
|
* if the assertion passes.
|
|
@@ -718,7 +705,7 @@ export declare const numericGuards: {
|
|
|
718
705
|
* - {@link assertWrap.isAbove} : the opposite assertion.
|
|
719
706
|
* - {@link assertWrap.isAtMost} : the more lenient assertion.
|
|
720
707
|
*/
|
|
721
|
-
isBelow:
|
|
708
|
+
isBelow<Actual extends number>(this: void, actual: Actual, expected: number, failureMessage?: string | undefined): Actual;
|
|
722
709
|
/**
|
|
723
710
|
* Asserts that a number is at most the expectation (`actual <= expected`). Returns the
|
|
724
711
|
* number if the assertion passes.
|
|
@@ -741,7 +728,7 @@ export declare const numericGuards: {
|
|
|
741
728
|
* - {@link assertWrap.isAtLeast} : the opposite assertion.
|
|
742
729
|
* - {@link assertWrap.isBelow} : the more restrictive assertion.
|
|
743
730
|
*/
|
|
744
|
-
isAtMost:
|
|
731
|
+
isAtMost<Actual extends number>(this: void, actual: Actual, expected: number, failureMessage?: string | undefined): Actual;
|
|
745
732
|
/**
|
|
746
733
|
* Asserts that a number is
|
|
747
734
|
* [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/NaN).
|
|
@@ -764,7 +751,7 @@ export declare const numericGuards: {
|
|
|
764
751
|
* @see
|
|
765
752
|
* - {@link assertWrap.isNumber} : can be used as the opposite assertion.
|
|
766
753
|
*/
|
|
767
|
-
isNaN:
|
|
754
|
+
isNaN<Actual extends number>(this: void, actual: Actual, failureMessage?: string | undefined): Actual;
|
|
768
755
|
/**
|
|
769
756
|
* Asserts that a number is finite: meaning, not `NaN` and not `Infinity` or `-Infinity`.
|
|
770
757
|
* Returns the number if the assertion passes.
|
|
@@ -788,7 +775,7 @@ export declare const numericGuards: {
|
|
|
788
775
|
* - {@link assertWrap.isNaN} : an opposite assertion.
|
|
789
776
|
* - {@link assertWrap.isInfinite} : an opposite assertion.
|
|
790
777
|
*/
|
|
791
|
-
isFinite:
|
|
778
|
+
isFinite<Actual extends number>(this: void, actual: Actual, failureMessage?: string | undefined): Actual;
|
|
792
779
|
/**
|
|
793
780
|
* Asserts that a number is either `Infinity` or `-Infinity`. Returns the number if the
|
|
794
781
|
* assertion passes.
|
|
@@ -812,7 +799,7 @@ export declare const numericGuards: {
|
|
|
812
799
|
* - {@link assertWrap.isNaN} : an opposite assertion.
|
|
813
800
|
* - {@link assertWrap.isInfinite} : an opposite assertion.
|
|
814
801
|
*/
|
|
815
|
-
isInfinite:
|
|
802
|
+
isInfinite<Actual extends number>(this: void, actual: Actual, failureMessage?: string | undefined): Actual;
|
|
816
803
|
/**
|
|
817
804
|
* Asserts that a number is within ±`delta` of the expectation. Returns the number if the
|
|
818
805
|
* assertion passes.
|
|
@@ -835,7 +822,7 @@ export declare const numericGuards: {
|
|
|
835
822
|
* @see
|
|
836
823
|
* - {@link assertWrap.isNotApproximately} : the opposite assertion.
|
|
837
824
|
*/
|
|
838
|
-
isApproximately:
|
|
825
|
+
isApproximately<Actual extends number>(this: void, actual: Actual, expected: number, delta: number, failureMessage?: string | undefined): Actual;
|
|
839
826
|
/**
|
|
840
827
|
* Asserts that a number is outside ±`delta` of the expectation. Returns the number if the
|
|
841
828
|
* assertion passes.
|
|
@@ -858,7 +845,7 @@ export declare const numericGuards: {
|
|
|
858
845
|
* @see
|
|
859
846
|
* - {@link assertWrap.isApproximately} : the opposite assertion.
|
|
860
847
|
*/
|
|
861
|
-
isNotApproximately:
|
|
848
|
+
isNotApproximately<Actual extends number>(this: void, actual: Actual, expected: number, delta: number, failureMessage?: string | undefined): Actual;
|
|
862
849
|
};
|
|
863
850
|
checkWrap: {
|
|
864
851
|
/**
|
|
@@ -881,7 +868,7 @@ export declare const numericGuards: {
|
|
|
881
868
|
* @see
|
|
882
869
|
* - {@link checkWrap.isOutBounds} : the opposite check.
|
|
883
870
|
*/
|
|
884
|
-
isInBounds:
|
|
871
|
+
isInBounds<Actual extends number>(this: void, actual: Actual, { max, min }: MinMax): Actual | undefined;
|
|
885
872
|
/**
|
|
886
873
|
* Checks that a number is outside the provided min and max bounds, exclusive. Returns the
|
|
887
874
|
* number if the check passes, otherwise `undefined`.
|
|
@@ -902,7 +889,7 @@ export declare const numericGuards: {
|
|
|
902
889
|
* @see
|
|
903
890
|
* - {@link checkWrap.isInBounds} : the opposite check.
|
|
904
891
|
*/
|
|
905
|
-
isOutBounds:
|
|
892
|
+
isOutBounds<Actual extends number>(this: void, actual: Actual, { max, min }: MinMax): Actual | undefined;
|
|
906
893
|
/**
|
|
907
894
|
* Checks that a number is an integer. Returns the number if the check passes, otherwise
|
|
908
895
|
* `undefined`. This has the same limitations as
|
|
@@ -924,7 +911,7 @@ export declare const numericGuards: {
|
|
|
924
911
|
* @see
|
|
925
912
|
* - {@link checkWrap.isNotInteger} : the opposite check.
|
|
926
913
|
*/
|
|
927
|
-
isInteger:
|
|
914
|
+
isInteger<Actual extends number>(this: void, actual: Actual): Actual | undefined;
|
|
928
915
|
/**
|
|
929
916
|
* Checks that a number is not an integer. Returns the number if the check passes, otherwise
|
|
930
917
|
* `undefined`. This has the same limitations, as
|
|
@@ -946,7 +933,7 @@ export declare const numericGuards: {
|
|
|
946
933
|
* @see
|
|
947
934
|
* - {@link checkWrap.isInteger} : the opposite check.
|
|
948
935
|
*/
|
|
949
|
-
isNotInteger:
|
|
936
|
+
isNotInteger<Actual extends number>(this: void, actual: Actual): Actual | undefined;
|
|
950
937
|
/**
|
|
951
938
|
* Checks that a number is above the expectation (`actual > expected`). Returns the number
|
|
952
939
|
* if the check passes, otherwise `undefined`.
|
|
@@ -968,7 +955,7 @@ export declare const numericGuards: {
|
|
|
968
955
|
* - {@link checkWrap.isBelow} : the opposite check.
|
|
969
956
|
* - {@link checkWrap.isAtLeast} : the more lenient check.
|
|
970
957
|
*/
|
|
971
|
-
isAbove:
|
|
958
|
+
isAbove<Actual extends number>(this: void, actual: Actual, expected: number): Actual | undefined;
|
|
972
959
|
/**
|
|
973
960
|
* Checks that a number is at least the expectation (`actual >= expected`). Returns the
|
|
974
961
|
* number if the check passes, otherwise `undefined`.
|
|
@@ -990,7 +977,7 @@ export declare const numericGuards: {
|
|
|
990
977
|
* - {@link checkWrap.isAtMost} : the opposite check.
|
|
991
978
|
* - {@link checkWrap.isAbove} : the more restrictive check.
|
|
992
979
|
*/
|
|
993
|
-
isAtLeast:
|
|
980
|
+
isAtLeast<Actual extends number>(this: void, actual: Actual, expected: number): Actual | undefined;
|
|
994
981
|
/**
|
|
995
982
|
* Checks that a number is below the expectation (`actual < expected`). Returns the number
|
|
996
983
|
* if the check passes, otherwise `undefined`.
|
|
@@ -1012,7 +999,7 @@ export declare const numericGuards: {
|
|
|
1012
999
|
* - {@link checkWrap.isAbove} : the opposite check.
|
|
1013
1000
|
* - {@link checkWrap.isAtMost} : the more lenient check.
|
|
1014
1001
|
*/
|
|
1015
|
-
isBelow:
|
|
1002
|
+
isBelow<Actual extends number>(this: void, actual: Actual, expected: number): Actual | undefined;
|
|
1016
1003
|
/**
|
|
1017
1004
|
* Checks that a number is at most the expectation (`actual <= expected`). Returns the
|
|
1018
1005
|
* number if the check passes, otherwise `undefined`.
|
|
@@ -1034,7 +1021,7 @@ export declare const numericGuards: {
|
|
|
1034
1021
|
* - {@link checkWrap.isAtLeast} : the opposite check.
|
|
1035
1022
|
* - {@link checkWrap.isBelow} : the more restrictive check.
|
|
1036
1023
|
*/
|
|
1037
|
-
isAtMost:
|
|
1024
|
+
isAtMost<Actual extends number>(this: void, actual: Actual, expected: number): Actual | undefined;
|
|
1038
1025
|
/**
|
|
1039
1026
|
* Checks that a number is
|
|
1040
1027
|
* [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/NaN).
|
|
@@ -1056,7 +1043,7 @@ export declare const numericGuards: {
|
|
|
1056
1043
|
* @see
|
|
1057
1044
|
* - {@link checkWrap.isNumber} : can be used as the opposite check.
|
|
1058
1045
|
*/
|
|
1059
|
-
isNaN:
|
|
1046
|
+
isNaN<Actual extends number>(this: void, actual: Actual): Actual | undefined;
|
|
1060
1047
|
/**
|
|
1061
1048
|
* Checks that a number is finite: meaning, not `NaN` and not `Infinity` or `-Infinity`.
|
|
1062
1049
|
* Returns the number if the check passes, otherwise `undefined`.
|
|
@@ -1079,7 +1066,7 @@ export declare const numericGuards: {
|
|
|
1079
1066
|
* - {@link checkWrap.isNaN} : an opposite check.
|
|
1080
1067
|
* - {@link checkWrap.isInfinite} : an opposite check.
|
|
1081
1068
|
*/
|
|
1082
|
-
isFinite:
|
|
1069
|
+
isFinite<Actual extends number>(this: void, actual: Actual): Actual | undefined;
|
|
1083
1070
|
/**
|
|
1084
1071
|
* Checks that a number is either `Infinity` or `-Infinity`. Returns the number if the check
|
|
1085
1072
|
* passes, otherwise `undefined`.
|
|
@@ -1102,7 +1089,7 @@ export declare const numericGuards: {
|
|
|
1102
1089
|
* - {@link checkWrap.isNaN} : an opposite check.
|
|
1103
1090
|
* - {@link checkWrap.isInfinite} : an opposite check.
|
|
1104
1091
|
*/
|
|
1105
|
-
isInfinite:
|
|
1092
|
+
isInfinite<Actual extends number>(this: void, actual: Actual): Actual | undefined;
|
|
1106
1093
|
/**
|
|
1107
1094
|
* Checks that a number is within ±`delta` of the expectation. Returns the number if the
|
|
1108
1095
|
* check passes, otherwise `undefined`.
|
|
@@ -1124,7 +1111,7 @@ export declare const numericGuards: {
|
|
|
1124
1111
|
* @see
|
|
1125
1112
|
* - {@link checkWrap.isNotApproximately} : the opposite check.
|
|
1126
1113
|
*/
|
|
1127
|
-
isApproximately:
|
|
1114
|
+
isApproximately<Actual extends number>(this: void, actual: Actual, expected: number, delta: number): Actual | undefined;
|
|
1128
1115
|
/**
|
|
1129
1116
|
* Checks that a number is outside ±`delta` of the expectation. Returns the number if the
|
|
1130
1117
|
* check passes, otherwise `undefined`.
|
|
@@ -1146,7 +1133,7 @@ export declare const numericGuards: {
|
|
|
1146
1133
|
* @see
|
|
1147
1134
|
* - {@link checkWrap.isApproximately} : the opposite check.
|
|
1148
1135
|
*/
|
|
1149
|
-
isNotApproximately:
|
|
1136
|
+
isNotApproximately<Actual extends number>(this: void, actual: Actual, expected: number, delta: number): Actual | undefined;
|
|
1150
1137
|
};
|
|
1151
1138
|
waitUntil: {
|
|
1152
1139
|
/**
|
|
@@ -1170,7 +1157,7 @@ export declare const numericGuards: {
|
|
|
1170
1157
|
* @see
|
|
1171
1158
|
* - {@link waitUntil.isOutBounds} : the opposite assertion.
|
|
1172
1159
|
*/
|
|
1173
|
-
isInBounds:
|
|
1160
|
+
isInBounds: <Actual extends number>(this: void, { max, min }: MinMax, callback: () => MaybePromise<Actual>, options?: WaitUntilOptions | undefined, failureMessage?: string | undefined) => Promise<Actual>;
|
|
1174
1161
|
/**
|
|
1175
1162
|
* Repeatedly calls a callback until its output is outside the provided min and max bounds,
|
|
1176
1163
|
* exclusive. If the attempts time out, an error is thrown.
|
|
@@ -1192,7 +1179,7 @@ export declare const numericGuards: {
|
|
|
1192
1179
|
* @see
|
|
1193
1180
|
* - {@link waitUntil.isInBounds} : the opposite assertion.
|
|
1194
1181
|
*/
|
|
1195
|
-
isOutBounds:
|
|
1182
|
+
isOutBounds: <Actual extends number>(this: void, { max, min }: MinMax, callback: () => MaybePromise<Actual>, options?: WaitUntilOptions | undefined, failureMessage?: string | undefined) => Promise<Actual>;
|
|
1196
1183
|
/**
|
|
1197
1184
|
* Repeatedly calls a callback until its output is an integer. This has the same limitations
|
|
1198
1185
|
* as
|
|
@@ -1216,7 +1203,7 @@ export declare const numericGuards: {
|
|
|
1216
1203
|
* @see
|
|
1217
1204
|
* - {@link waitUntil.isNotInteger} : the opposite assertion.
|
|
1218
1205
|
*/
|
|
1219
|
-
isInteger:
|
|
1206
|
+
isInteger: <Actual extends number>(this: void, callback: () => MaybePromise<Actual>, options?: WaitUntilOptions | undefined, failureMessage?: string | undefined) => Promise<Actual>;
|
|
1220
1207
|
/**
|
|
1221
1208
|
* Repeatedly calls a callback until its output is not an integer. This has the same
|
|
1222
1209
|
* limitations, as
|
|
@@ -1240,7 +1227,7 @@ export declare const numericGuards: {
|
|
|
1240
1227
|
* @see
|
|
1241
1228
|
* - {@link waitUntil.isInteger} : the opposite assertion.
|
|
1242
1229
|
*/
|
|
1243
|
-
isNotInteger:
|
|
1230
|
+
isNotInteger: <Actual extends number>(this: void, callback: () => MaybePromise<Actual>, options?: WaitUntilOptions | undefined, failureMessage?: string | undefined) => Promise<Actual>;
|
|
1244
1231
|
/**
|
|
1245
1232
|
* Repeatedly calls a callback until its output is a number that is above the expectation
|
|
1246
1233
|
* (`actual > expected`). Once the callback output passes, it is returned. If the attempts
|
|
@@ -1264,7 +1251,7 @@ export declare const numericGuards: {
|
|
|
1264
1251
|
* - {@link waitUntil.isBelow} : the opposite assertion.
|
|
1265
1252
|
* - {@link waitUntil.isAtLeast} : the more lenient assertion.
|
|
1266
1253
|
*/
|
|
1267
|
-
isAbove:
|
|
1254
|
+
isAbove: <Actual extends number>(this: void, expected: number, callback: () => MaybePromise<Actual>, options?: WaitUntilOptions | undefined, failureMessage?: string | undefined) => Promise<Actual>;
|
|
1268
1255
|
/**
|
|
1269
1256
|
* Repeatedly calls a callback until its output is a number that is at least the expectation
|
|
1270
1257
|
* (`actual >= expected`). Once the callback output passes, it is returned. If the attempts
|
|
@@ -1288,7 +1275,7 @@ export declare const numericGuards: {
|
|
|
1288
1275
|
* - {@link waitUntil.isAtMost} : the opposite assertion.
|
|
1289
1276
|
* - {@link waitUntil.isAbove} : the more restrictive assertion.
|
|
1290
1277
|
*/
|
|
1291
|
-
isAtLeast:
|
|
1278
|
+
isAtLeast: <Actual extends number>(this: void, expected: number, callback: () => MaybePromise<Actual>, options?: WaitUntilOptions | undefined, failureMessage?: string | undefined) => Promise<Actual>;
|
|
1292
1279
|
/**
|
|
1293
1280
|
* Repeatedly calls a callback until its output is a number that is below the expectation
|
|
1294
1281
|
* (`actual < expected`). Once the callback output passes, it is returned. If the attempts
|
|
@@ -1312,7 +1299,7 @@ export declare const numericGuards: {
|
|
|
1312
1299
|
* - {@link waitUntil.isAbove} : the opposite assertion.
|
|
1313
1300
|
* - {@link waitUntil.isAtMost} : the more lenient assertion.
|
|
1314
1301
|
*/
|
|
1315
|
-
isBelow:
|
|
1302
|
+
isBelow: <Actual extends number>(this: void, expected: number, callback: () => MaybePromise<Actual>, options?: WaitUntilOptions | undefined, failureMessage?: string | undefined) => Promise<Actual>;
|
|
1316
1303
|
/**
|
|
1317
1304
|
* Repeatedly calls a callback until its output is a number that is at most the expectation
|
|
1318
1305
|
* (`actual <= expected`). Once the callback output passes, it is returned. If the attempts
|
|
@@ -1336,7 +1323,7 @@ export declare const numericGuards: {
|
|
|
1336
1323
|
* - {@link waitUntil.isAtLeast} : the opposite assertion.
|
|
1337
1324
|
* - {@link waitUntil.isBelow} : the more restrictive assertion.
|
|
1338
1325
|
*/
|
|
1339
|
-
isAtMost:
|
|
1326
|
+
isAtMost: <Actual extends number>(this: void, expected: number, callback: () => MaybePromise<Actual>, options?: WaitUntilOptions | undefined, failureMessage?: string | undefined) => Promise<Actual>;
|
|
1340
1327
|
/**
|
|
1341
1328
|
* Repeatedly calls a callback until its output is a number that is
|
|
1342
1329
|
* [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/NaN).
|
|
@@ -1360,7 +1347,7 @@ export declare const numericGuards: {
|
|
|
1360
1347
|
* @see
|
|
1361
1348
|
* - {@link waitUntil.isNumber} : can be used as the opposite assertion.
|
|
1362
1349
|
*/
|
|
1363
|
-
isNaN:
|
|
1350
|
+
isNaN: <Actual extends number>(this: void, callback: () => MaybePromise<Actual>, options?: WaitUntilOptions | undefined, failureMessage?: string | undefined) => Promise<Actual>;
|
|
1364
1351
|
/**
|
|
1365
1352
|
* Repeatedly calls a callback until its output is a number that is finite: meaning, not
|
|
1366
1353
|
* `NaN` and not `Infinity` or `-Infinity`. Once the callback output passes, it is returned.
|
|
@@ -1385,7 +1372,7 @@ export declare const numericGuards: {
|
|
|
1385
1372
|
* - {@link waitUntil.isNaN} : an opposite assertion.
|
|
1386
1373
|
* - {@link waitUntil.isInfinite} : an opposite assertion.
|
|
1387
1374
|
*/
|
|
1388
|
-
isFinite:
|
|
1375
|
+
isFinite: <Actual extends number>(this: void, callback: () => MaybePromise<Actual>, options?: WaitUntilOptions | undefined, failureMessage?: string | undefined) => Promise<Actual>;
|
|
1389
1376
|
/**
|
|
1390
1377
|
* Repeatedly calls a callback until its output is a number that is either `Infinity` or
|
|
1391
1378
|
* `-Infinity`. Once the callback output passes, it is returned. If the attempts time out,
|
|
@@ -1410,7 +1397,7 @@ export declare const numericGuards: {
|
|
|
1410
1397
|
* - {@link waitUntil.isNaN} : an opposite assertion.
|
|
1411
1398
|
* - {@link waitUntil.isInfinite} : an opposite assertion.
|
|
1412
1399
|
*/
|
|
1413
|
-
isInfinite:
|
|
1400
|
+
isInfinite: <Actual extends number>(this: void, callback: () => MaybePromise<Actual>, options?: WaitUntilOptions | undefined, failureMessage?: string | undefined) => Promise<Actual>;
|
|
1414
1401
|
/**
|
|
1415
1402
|
* Repeatedly calls a callback until its output is a number that is within ±`delta` of the
|
|
1416
1403
|
* expectation. Once the callback output passes, it is returned. If the attempts time out,
|
|
@@ -1434,7 +1421,7 @@ export declare const numericGuards: {
|
|
|
1434
1421
|
* @see
|
|
1435
1422
|
* - {@link waitUntil.isNotApproximately} : the opposite assertion.
|
|
1436
1423
|
*/
|
|
1437
|
-
isApproximately:
|
|
1424
|
+
isApproximately: <Actual extends number>(this: void, expected: number, delta: number, callback: () => MaybePromise<Actual>, options?: WaitUntilOptions | undefined, failureMessage?: string | undefined) => Promise<Actual>;
|
|
1438
1425
|
/**
|
|
1439
1426
|
* Repeatedly calls a callback until its output is a number that is outside ±`delta` of the
|
|
1440
1427
|
* expectation. Once the callback output passes, it is returned. If the attempts time out,
|
|
@@ -1458,7 +1445,6 @@ export declare const numericGuards: {
|
|
|
1458
1445
|
* @see
|
|
1459
1446
|
* - {@link waitUntil.isApproximately} : the opposite assertion.
|
|
1460
1447
|
*/
|
|
1461
|
-
isNotApproximately:
|
|
1448
|
+
isNotApproximately: <Actual extends number>(this: void, expected: number, delta: number, callback: () => MaybePromise<Actual>, options?: WaitUntilOptions | undefined, failureMessage?: string | undefined) => Promise<Actual>;
|
|
1462
1449
|
};
|
|
1463
1450
|
};
|
|
1464
|
-
export {};
|