@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,8 +1,8 @@
|
|
|
1
1
|
import type { NarrowToExpected } from '@augment-vir/core';
|
|
2
2
|
import { type EnumBaseType, type MaybePromise } from '@augment-vir/core';
|
|
3
3
|
import { type WaitUntilOptions } from '../guard-types/wait-until-function.js';
|
|
4
|
-
export declare function
|
|
5
|
-
declare function
|
|
4
|
+
export declare function assertIsEnumValue<const Expected extends EnumBaseType>(this: void, child: unknown, checkEnum: Expected, failureMessage?: string | undefined): asserts child is Expected[keyof Expected];
|
|
5
|
+
export declare function isEnumValue<const Expected extends EnumBaseType>(this: void, child: unknown, checkEnum: Expected): child is Expected[keyof Expected];
|
|
6
6
|
export declare const enumGuards: {
|
|
7
7
|
assert: {
|
|
8
8
|
/**
|
|
@@ -28,7 +28,7 @@ export declare const enumGuards: {
|
|
|
28
28
|
* @see
|
|
29
29
|
* - {@link assert.isNotEnumValue} : the opposite assertion.
|
|
30
30
|
*/
|
|
31
|
-
isEnumValue:
|
|
31
|
+
isEnumValue<const Expected extends EnumBaseType>(this: void, child: unknown, checkEnum: Expected, failureMessage?: string | undefined): asserts child is Expected[keyof Expected];
|
|
32
32
|
/**
|
|
33
33
|
* Asserts that a child value is _not_ an enum member.
|
|
34
34
|
*
|
|
@@ -52,7 +52,7 @@ export declare const enumGuards: {
|
|
|
52
52
|
* @see
|
|
53
53
|
* - {@link assert.isEnumValue} : the opposite assertion.
|
|
54
54
|
*/
|
|
55
|
-
isNotEnumValue:
|
|
55
|
+
isNotEnumValue<const Actual, const Expected extends EnumBaseType>(this: void, child: Actual, checkEnum: Expected, failureMessage?: string | undefined): asserts child is Exclude<Actual, Expected[keyof Expected] | `${Expected[keyof Expected]}`>;
|
|
56
56
|
};
|
|
57
57
|
check: {
|
|
58
58
|
/**
|
|
@@ -77,7 +77,7 @@ export declare const enumGuards: {
|
|
|
77
77
|
* @see
|
|
78
78
|
* - {@link check.isNotEnumValue} : the opposite check.
|
|
79
79
|
*/
|
|
80
|
-
isEnumValue:
|
|
80
|
+
isEnumValue: typeof isEnumValue;
|
|
81
81
|
/**
|
|
82
82
|
* Checks that a child value is _not_ an enum member.
|
|
83
83
|
*
|
|
@@ -100,7 +100,7 @@ export declare const enumGuards: {
|
|
|
100
100
|
* @see
|
|
101
101
|
* - {@link check.isEnumValue} : the opposite check.
|
|
102
102
|
*/
|
|
103
|
-
isNotEnumValue
|
|
103
|
+
isNotEnumValue<const Actual, const Expected extends EnumBaseType>(this: void, child: Actual, checkEnum: Expected): child is Exclude<Actual, Expected[keyof Expected] | `${Expected[keyof Expected]}`>;
|
|
104
104
|
};
|
|
105
105
|
assertWrap: {
|
|
106
106
|
/**
|
|
@@ -128,7 +128,7 @@ export declare const enumGuards: {
|
|
|
128
128
|
* @see
|
|
129
129
|
* - {@link assertWrap.isNotEnumValue} : the opposite assertion.
|
|
130
130
|
*/
|
|
131
|
-
isEnumValue
|
|
131
|
+
isEnumValue<const Actual, const Expected extends EnumBaseType>(this: void, child: Actual, checkEnum: Expected, failureMessage?: string | undefined): NarrowToExpected<Actual, Expected[keyof Expected]>;
|
|
132
132
|
/**
|
|
133
133
|
* Asserts that a child value is _not_ an enum member. Returns the child value if the
|
|
134
134
|
* assertion passes.
|
|
@@ -154,7 +154,7 @@ export declare const enumGuards: {
|
|
|
154
154
|
* @see
|
|
155
155
|
* - {@link assertWrap.isEnumValue} : the opposite assertion.
|
|
156
156
|
*/
|
|
157
|
-
isNotEnumValue
|
|
157
|
+
isNotEnumValue<const Actual, const Expected extends EnumBaseType>(this: void, child: Actual, checkEnum: Expected, failureMessage?: string | undefined): Exclude<Actual, Expected[keyof Expected] | `${Expected[keyof Expected]}`>;
|
|
158
158
|
};
|
|
159
159
|
checkWrap: {
|
|
160
160
|
/**
|
|
@@ -181,7 +181,7 @@ export declare const enumGuards: {
|
|
|
181
181
|
* @see
|
|
182
182
|
* - {@link checkWrap.isNotEnumValue} : the opposite check.
|
|
183
183
|
*/
|
|
184
|
-
isEnumValue
|
|
184
|
+
isEnumValue<const Actual, const Expected extends EnumBaseType>(this: void, child: Actual, checkEnum: Expected): NarrowToExpected<Actual, Expected[keyof Expected]> | undefined;
|
|
185
185
|
/**
|
|
186
186
|
* Checks that a child value is _not_ an enum member. Returns the child value if the check
|
|
187
187
|
* passes, otherwise `undefined`.
|
|
@@ -206,7 +206,7 @@ export declare const enumGuards: {
|
|
|
206
206
|
* @see
|
|
207
207
|
* - {@link checkWrap.isEnumValue} : the opposite check.
|
|
208
208
|
*/
|
|
209
|
-
isNotEnumValue
|
|
209
|
+
isNotEnumValue<const Actual, const Expected extends EnumBaseType>(this: void, child: Actual, checkEnum: Expected): Exclude<Actual, Expected[keyof Expected] | `${Expected[keyof Expected]}`> | undefined;
|
|
210
210
|
};
|
|
211
211
|
waitUntil: {
|
|
212
212
|
/**
|
|
@@ -234,7 +234,7 @@ export declare const enumGuards: {
|
|
|
234
234
|
* @see
|
|
235
235
|
* - {@link waitUntil.isNotEnumValue} : the opposite assertion.
|
|
236
236
|
*/
|
|
237
|
-
isEnumValue: <const Actual, const Expected extends EnumBaseType>(checkEnum: Expected, callback: () => MaybePromise<Actual>, options?: WaitUntilOptions | undefined, failureMessage?: string | undefined) => Promise<NarrowToExpected<Actual, Expected[keyof Expected]>>;
|
|
237
|
+
isEnumValue: <const Actual, const Expected extends EnumBaseType>(this: void, checkEnum: Expected, callback: () => MaybePromise<Actual>, options?: WaitUntilOptions | undefined, failureMessage?: string | undefined) => Promise<NarrowToExpected<Actual, Expected[keyof Expected]>>;
|
|
238
238
|
/**
|
|
239
239
|
* Repeatedly calls a callback until its output is _not_ an enum member. Once the callback
|
|
240
240
|
* output passes, it is returned. If the attempts time out, an error is thrown.
|
|
@@ -260,7 +260,6 @@ export declare const enumGuards: {
|
|
|
260
260
|
* @see
|
|
261
261
|
* - {@link waitUntil.isEnumValue} : the opposite assertion.
|
|
262
262
|
*/
|
|
263
|
-
isNotEnumValue: <const Actual, const Expected extends EnumBaseType>(checkEnum: Expected, callback: () => MaybePromise<Actual>, options?: WaitUntilOptions | undefined, failureMessage?: string | undefined) => Promise<Exclude<Actual, Expected[keyof Expected] | `${Expected[keyof Expected]}`>>;
|
|
263
|
+
isNotEnumValue: <const Actual, const Expected extends EnumBaseType>(this: void, checkEnum: Expected, callback: () => MaybePromise<Actual>, options?: WaitUntilOptions | undefined, failureMessage?: string | undefined) => Promise<Exclude<Actual, Expected[keyof Expected] | `${Expected[keyof Expected]}`>>;
|
|
264
264
|
};
|
|
265
265
|
};
|
|
266
|
-
export {};
|
package/dist/assertions/enum.js
CHANGED
|
@@ -1,25 +1,72 @@
|
|
|
1
1
|
import { getEnumValues } from '@augment-vir/core';
|
|
2
2
|
import { AssertionError } from '../augments/assertion.error.js';
|
|
3
|
-
import {
|
|
4
|
-
export function
|
|
3
|
+
import { createWaitUntil } from '../guard-types/wait-until-function.js';
|
|
4
|
+
export function assertIsEnumValue(child, checkEnum, failureMessage) {
|
|
5
5
|
const values = getEnumValues(checkEnum);
|
|
6
6
|
if (!values.includes(child)) {
|
|
7
7
|
throw new AssertionError(`${String(child)} is not an enum value in '${values.join(',')}'.`, failureMessage);
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
function
|
|
11
|
-
try {
|
|
12
|
-
isEnumValue(child, checkEnum);
|
|
13
|
-
}
|
|
14
|
-
catch {
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
10
|
+
export function isEnumValue(child, checkEnum) {
|
|
17
11
|
const values = getEnumValues(checkEnum);
|
|
18
|
-
|
|
12
|
+
return values.includes(child);
|
|
19
13
|
}
|
|
20
14
|
const assertions = {
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Asserts that a child value is an enum member.
|
|
17
|
+
*
|
|
18
|
+
* Type guards the child value.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
*
|
|
22
|
+
* ```ts
|
|
23
|
+
* import {assert} from '@augment-vir/assert';
|
|
24
|
+
*
|
|
25
|
+
* enum MyEnum {
|
|
26
|
+
* A = 'a',
|
|
27
|
+
* B = 'b',
|
|
28
|
+
* }
|
|
29
|
+
*
|
|
30
|
+
* assert.isEnumValue('a', MyEnum); // passes
|
|
31
|
+
* assert.isEnumValue('A', MyEnum); // fails
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* @throws {@link AssertionError} If the child is not an enum member.
|
|
35
|
+
* @see
|
|
36
|
+
* - {@link assert.isNotEnumValue} : the opposite assertion.
|
|
37
|
+
*/
|
|
38
|
+
isEnumValue(child, checkEnum, failureMessage) {
|
|
39
|
+
assertIsEnumValue(child, checkEnum, failureMessage);
|
|
40
|
+
},
|
|
41
|
+
/**
|
|
42
|
+
* Asserts that a child value is _not_ an enum member.
|
|
43
|
+
*
|
|
44
|
+
* Type guards the child value.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
*
|
|
48
|
+
* ```ts
|
|
49
|
+
* import {assert} from '@augment-vir/assert';
|
|
50
|
+
*
|
|
51
|
+
* enum MyEnum {
|
|
52
|
+
* A = 'a',
|
|
53
|
+
* B = 'b',
|
|
54
|
+
* }
|
|
55
|
+
*
|
|
56
|
+
* assert.isNotEnumValue('a', MyEnum); // fails
|
|
57
|
+
* assert.isNotEnumValue('A', MyEnum); // passes
|
|
58
|
+
* ```
|
|
59
|
+
*
|
|
60
|
+
* @throws {@link AssertionError} If the child is an enum member.
|
|
61
|
+
* @see
|
|
62
|
+
* - {@link assert.isEnumValue} : the opposite assertion.
|
|
63
|
+
*/
|
|
64
|
+
isNotEnumValue(child, checkEnum, failureMessage) {
|
|
65
|
+
const values = getEnumValues(checkEnum);
|
|
66
|
+
if (values.includes(child)) {
|
|
67
|
+
throw new AssertionError(`${String(child)} is an enum value in '${values.join(',')}'.`, failureMessage);
|
|
68
|
+
}
|
|
69
|
+
},
|
|
23
70
|
};
|
|
24
71
|
export const enumGuards = {
|
|
25
72
|
assert: assertions,
|
|
@@ -46,7 +93,7 @@ export const enumGuards = {
|
|
|
46
93
|
* @see
|
|
47
94
|
* - {@link check.isNotEnumValue} : the opposite check.
|
|
48
95
|
*/
|
|
49
|
-
isEnumValue
|
|
96
|
+
isEnumValue,
|
|
50
97
|
/**
|
|
51
98
|
* Checks that a child value is _not_ an enum member.
|
|
52
99
|
*
|
|
@@ -69,7 +116,10 @@ export const enumGuards = {
|
|
|
69
116
|
* @see
|
|
70
117
|
* - {@link check.isEnumValue} : the opposite check.
|
|
71
118
|
*/
|
|
72
|
-
isNotEnumValue
|
|
119
|
+
isNotEnumValue(child, checkEnum) {
|
|
120
|
+
const values = getEnumValues(checkEnum);
|
|
121
|
+
return !values.includes(child);
|
|
122
|
+
},
|
|
73
123
|
},
|
|
74
124
|
assertWrap: {
|
|
75
125
|
/**
|
|
@@ -97,7 +147,13 @@ export const enumGuards = {
|
|
|
97
147
|
* @see
|
|
98
148
|
* - {@link assertWrap.isNotEnumValue} : the opposite assertion.
|
|
99
149
|
*/
|
|
100
|
-
isEnumValue
|
|
150
|
+
isEnumValue(child, checkEnum, failureMessage) {
|
|
151
|
+
const values = getEnumValues(checkEnum);
|
|
152
|
+
if (!values.includes(child)) {
|
|
153
|
+
throw new AssertionError(`${String(child)} is not an enum value in '${values.join(',')}'.`, failureMessage);
|
|
154
|
+
}
|
|
155
|
+
return child;
|
|
156
|
+
},
|
|
101
157
|
/**
|
|
102
158
|
* Asserts that a child value is _not_ an enum member. Returns the child value if the
|
|
103
159
|
* assertion passes.
|
|
@@ -123,7 +179,13 @@ export const enumGuards = {
|
|
|
123
179
|
* @see
|
|
124
180
|
* - {@link assertWrap.isEnumValue} : the opposite assertion.
|
|
125
181
|
*/
|
|
126
|
-
isNotEnumValue
|
|
182
|
+
isNotEnumValue(child, checkEnum, failureMessage) {
|
|
183
|
+
const values = getEnumValues(checkEnum);
|
|
184
|
+
if (values.includes(child)) {
|
|
185
|
+
throw new AssertionError(`${String(child)} is not an enum value in '${values.join(',')}'.`, failureMessage);
|
|
186
|
+
}
|
|
187
|
+
return child;
|
|
188
|
+
},
|
|
127
189
|
},
|
|
128
190
|
checkWrap: {
|
|
129
191
|
/**
|
|
@@ -150,7 +212,15 @@ export const enumGuards = {
|
|
|
150
212
|
* @see
|
|
151
213
|
* - {@link checkWrap.isNotEnumValue} : the opposite check.
|
|
152
214
|
*/
|
|
153
|
-
isEnumValue
|
|
215
|
+
isEnumValue(child, checkEnum) {
|
|
216
|
+
const values = getEnumValues(checkEnum);
|
|
217
|
+
if (values.includes(child)) {
|
|
218
|
+
return child;
|
|
219
|
+
}
|
|
220
|
+
else {
|
|
221
|
+
return undefined;
|
|
222
|
+
}
|
|
223
|
+
},
|
|
154
224
|
/**
|
|
155
225
|
* Checks that a child value is _not_ an enum member. Returns the child value if the check
|
|
156
226
|
* passes, otherwise `undefined`.
|
|
@@ -175,7 +245,15 @@ export const enumGuards = {
|
|
|
175
245
|
* @see
|
|
176
246
|
* - {@link checkWrap.isEnumValue} : the opposite check.
|
|
177
247
|
*/
|
|
178
|
-
isNotEnumValue
|
|
248
|
+
isNotEnumValue(child, checkEnum) {
|
|
249
|
+
const values = getEnumValues(checkEnum);
|
|
250
|
+
if (values.includes(child)) {
|
|
251
|
+
return undefined;
|
|
252
|
+
}
|
|
253
|
+
else {
|
|
254
|
+
return child;
|
|
255
|
+
}
|
|
256
|
+
},
|
|
179
257
|
},
|
|
180
258
|
waitUntil: {
|
|
181
259
|
/**
|
|
@@ -203,7 +281,7 @@ export const enumGuards = {
|
|
|
203
281
|
* @see
|
|
204
282
|
* - {@link waitUntil.isNotEnumValue} : the opposite assertion.
|
|
205
283
|
*/
|
|
206
|
-
isEnumValue:
|
|
284
|
+
isEnumValue: createWaitUntil(assertions.isEnumValue),
|
|
207
285
|
/**
|
|
208
286
|
* Repeatedly calls a callback until its output is _not_ an enum member. Once the callback
|
|
209
287
|
* output passes, it is returned. If the attempts time out, an error is thrown.
|
|
@@ -229,6 +307,6 @@ export const enumGuards = {
|
|
|
229
307
|
* @see
|
|
230
308
|
* - {@link waitUntil.isEnumValue} : the opposite assertion.
|
|
231
309
|
*/
|
|
232
|
-
isNotEnumValue:
|
|
310
|
+
isNotEnumValue: createWaitUntil(assertions.isNotEnumValue),
|
|
233
311
|
},
|
|
234
312
|
};
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import type { NarrowToExpected } from '@augment-vir/core';
|
|
2
|
-
import { type MaybePromise } from '@augment-vir/core';
|
|
3
|
-
import { autoGuardSymbol } from '../../guard-types/guard-override.js';
|
|
2
|
+
import { type AnyObject, type MaybePromise } from '@augment-vir/core';
|
|
4
3
|
import { type WaitUntilOptions } from '../../guard-types/wait-until-function.js';
|
|
5
|
-
declare function entriesEqual<const Actual extends object, const Expected extends Actual>(actual: Actual, expected: Expected, failureMessage?: string | undefined): asserts actual is Expected;
|
|
6
|
-
declare function notEntriesEqual(actual: object, expected: object, failureMessage?: string | undefined): void;
|
|
7
4
|
export declare const entryEqualityGuards: {
|
|
8
5
|
assert: {
|
|
9
6
|
/**
|
|
@@ -33,7 +30,7 @@ export declare const entryEqualityGuards: {
|
|
|
33
30
|
* - {@link assert.jsonEquals} : another deep equality assertion.
|
|
34
31
|
* - {@link assert.deepEquals} : the most thorough (but also slow) deep equality assertion.
|
|
35
32
|
*/
|
|
36
|
-
entriesEqual:
|
|
33
|
+
entriesEqual<Actual extends AnyObject, const Expected extends Actual>(this: void, actual: Actual, expected: Expected, failureMessage?: string | undefined): asserts actual is Expected;
|
|
37
34
|
/**
|
|
38
35
|
* Asserts that two objects are _not_ deeply equal by checking only their top-level values for
|
|
39
36
|
* strict (non-deep, reference, using
|
|
@@ -61,7 +58,7 @@ export declare const entryEqualityGuards: {
|
|
|
61
58
|
* - {@link assert.notJsonEquals} : another not deep equality assertion.
|
|
62
59
|
* - {@link assert.notDeepEquals} : the most thorough (but also slow) not deep equality assertion.
|
|
63
60
|
*/
|
|
64
|
-
notEntriesEqual:
|
|
61
|
+
notEntriesEqual(this: void, actual: AnyObject, expected: AnyObject, failureMessage?: string | undefined): void;
|
|
65
62
|
};
|
|
66
63
|
check: {
|
|
67
64
|
/**
|
|
@@ -90,7 +87,7 @@ export declare const entryEqualityGuards: {
|
|
|
90
87
|
* - {@link check.jsonEquals} : another deep equality check.
|
|
91
88
|
* - {@link check.deepEquals} : the most thorough (but also slow) deep equality check.
|
|
92
89
|
*/
|
|
93
|
-
entriesEqual
|
|
90
|
+
entriesEqual<Actual extends AnyObject, Expected extends Actual>(this: void, actual: Actual, expected: Expected): actual is Expected;
|
|
94
91
|
/**
|
|
95
92
|
* Checks that two objects are _not_ deeply equal by checking only their top-level values
|
|
96
93
|
* for strict (non-deep, reference, using
|
|
@@ -117,7 +114,7 @@ export declare const entryEqualityGuards: {
|
|
|
117
114
|
* - {@link check.notJsonEquals} : another not deep equality check.
|
|
118
115
|
* - {@link check.notDeepEquals} : the most thorough (but also slow) not deep equality check.
|
|
119
116
|
*/
|
|
120
|
-
notEntriesEqual:
|
|
117
|
+
notEntriesEqual(this: void, actual: AnyObject, expected: AnyObject): boolean;
|
|
121
118
|
};
|
|
122
119
|
assertWrap: {
|
|
123
120
|
/**
|
|
@@ -148,7 +145,7 @@ export declare const entryEqualityGuards: {
|
|
|
148
145
|
* - {@link assertWrap.jsonEquals} : another deep equality assertion.
|
|
149
146
|
* - {@link assertWrap.deepEquals} : the most thorough (but also slow) deep equality assertion.
|
|
150
147
|
*/
|
|
151
|
-
entriesEqual
|
|
148
|
+
entriesEqual<Actual extends AnyObject, Expected extends Actual>(this: void, actual: Actual, expected: Expected, failureMessage?: string | undefined): NarrowToExpected<Actual, Expected>;
|
|
152
149
|
/**
|
|
153
150
|
* Asserts that two objects are _not_ deeply equal by checking only their top-level values
|
|
154
151
|
* for strict (non-deep, reference, using
|
|
@@ -177,7 +174,7 @@ export declare const entryEqualityGuards: {
|
|
|
177
174
|
* - {@link assertWrap.notJsonEquals} : another not deep equality assertion.
|
|
178
175
|
* - {@link assertWrap.notDeepEquals} : the most thorough (but also slow) not deep equality assertion.
|
|
179
176
|
*/
|
|
180
|
-
notEntriesEqual:
|
|
177
|
+
notEntriesEqual<Actual extends AnyObject>(this: void, actual: Actual, expected: AnyObject, failureMessage?: string | undefined): Actual;
|
|
181
178
|
};
|
|
182
179
|
checkWrap: {
|
|
183
180
|
/**
|
|
@@ -208,7 +205,7 @@ export declare const entryEqualityGuards: {
|
|
|
208
205
|
* - {@link checkWrap.jsonEquals} : another deep equality check.
|
|
209
206
|
* - {@link checkWrap.deepEquals} : the most thorough (but also slow) deep equality check.
|
|
210
207
|
*/
|
|
211
|
-
entriesEqual
|
|
208
|
+
entriesEqual<Actual extends object, Expected extends Actual>(this: void, actual: Actual, expected: Expected): NarrowToExpected<Actual, Expected> | undefined;
|
|
212
209
|
/**
|
|
213
210
|
* Checks that two objects are _not_ deeply equal by checking only their top-level values
|
|
214
211
|
* for strict (non-deep, reference, using
|
|
@@ -237,7 +234,7 @@ export declare const entryEqualityGuards: {
|
|
|
237
234
|
* - {@link checkWrap.notJsonEquals} : another not deep equality check.
|
|
238
235
|
* - {@link checkWrap.notDeepEquals} : the most thorough (but also slow) not deep equality check.
|
|
239
236
|
*/
|
|
240
|
-
notEntriesEqual:
|
|
237
|
+
notEntriesEqual(this: void, actual: AnyObject, expected: AnyObject): AnyObject | undefined;
|
|
241
238
|
};
|
|
242
239
|
waitUntil: {
|
|
243
240
|
/**
|
|
@@ -274,7 +271,7 @@ export declare const entryEqualityGuards: {
|
|
|
274
271
|
* - {@link waitUntil.jsonEquals} : another deep equality assertion.
|
|
275
272
|
* - {@link waitUntil.deepEquals} : the most thorough (but also slow) deep equality assertion.
|
|
276
273
|
*/
|
|
277
|
-
entriesEqual: <Actual, Expected extends Actual>(expected: Expected, callback: () => MaybePromise<Actual>, options?: WaitUntilOptions | undefined, failureMessage?: string | undefined) => Promise<NarrowToExpected<Actual, Expected>>;
|
|
274
|
+
entriesEqual: <Actual extends AnyObject, Expected extends Actual>(this: void, expected: Expected, callback: () => MaybePromise<Actual>, options?: WaitUntilOptions | undefined, failureMessage?: string | undefined) => Promise<NarrowToExpected<Actual, Expected>>;
|
|
278
275
|
/**
|
|
279
276
|
* Repeatedly calls a callback until its output is _not_ deeply equal to the first input by
|
|
280
277
|
* checking only their top-level values for strict (non-deep, reference, using
|
|
@@ -310,7 +307,6 @@ export declare const entryEqualityGuards: {
|
|
|
310
307
|
* - {@link waitUntil.notJsonEquals} : another not deep equality assertion.
|
|
311
308
|
* - {@link waitUntil.notDeepEquals} : the most thorough (but also slow) not deep equality assertion.
|
|
312
309
|
*/
|
|
313
|
-
notEntriesEqual:
|
|
310
|
+
notEntriesEqual: <Actual extends AnyObject>(this: void, expected: unknown, callback: () => MaybePromise<Actual>, options?: WaitUntilOptions | undefined, failureMessage?: string | undefined) => Promise<Actual>;
|
|
314
311
|
};
|
|
315
312
|
};
|
|
316
|
-
export {};
|