1 | import { Predicate, type PredicateOptions } from './predicate.js';
|
2 | export declare class MapPredicate<T1 = unknown, T2 = unknown> extends Predicate<Map<T1, T2>> {
|
3 | |
4 |
|
5 |
|
6 | constructor(options?: PredicateOptions);
|
7 | /**
|
8 | Test a Map to have a specific size.
|
9 |
|
10 | @param size - The size of the Map.
|
11 | */
|
12 | size(size: number): this;
|
13 | /**
|
14 | Test an Map to have a minimum size.
|
15 |
|
16 | @param size - The minimum size of the Map.
|
17 | */
|
18 | minSize(size: number): this;
|
19 | /**
|
20 | Test an Map to have a maximum size.
|
21 |
|
22 | @param size - The maximum size of the Map.
|
23 | */
|
24 | maxSize(size: number): this;
|
25 | /**
|
26 | Test a Map to include all the provided keys. The keys are tested by identity, not structure.
|
27 |
|
28 | @param keys - The keys that should be a key in the Map.
|
29 | */
|
30 | hasKeys(...keys: readonly T1[]): this;
|
31 | /**
|
32 | Test a Map to include any of the provided keys. The keys are tested by identity, not structure.
|
33 |
|
34 | @param keys - The keys that could be a key in the Map.
|
35 | */
|
36 | hasAnyKeys(...keys: readonly T1[]): this;
|
37 | /**
|
38 | Test a Map to include all the provided values. The values are tested by identity, not structure.
|
39 |
|
40 | @param values - The values that should be a value in the Map.
|
41 | */
|
42 | hasValues(...values: readonly T2[]): this;
|
43 | /**
|
44 | Test a Map to include any of the provided values. The values are tested by identity, not structure.
|
45 |
|
46 | @param values - The values that could be a value in the Map.
|
47 | */
|
48 | hasAnyValues(...values: readonly T2[]): this;
|
49 | /**
|
50 | Test all the keys in the Map to match the provided predicate.
|
51 |
|
52 | @param predicate - The predicate that should be applied against every key in the Map.
|
53 | */
|
54 | keysOfType(predicate: Predicate<T1>): this;
|
55 | /**
|
56 | Test all the values in the Map to match the provided predicate.
|
57 |
|
58 | @param predicate - The predicate that should be applied against every value in the Map.
|
59 | */
|
60 | valuesOfType(predicate: Predicate<T2>): this;
|
61 | /**
|
62 | Test a Map to be empty.
|
63 | */
|
64 | get empty(): this;
|
65 | /**
|
66 | Test a Map to be not empty.
|
67 | */
|
68 | get nonEmpty(): this;
|
69 | /**
|
70 | Test a Map to be deeply equal to the provided Map.
|
71 |
|
72 | @param expected - Expected Map to match.
|
73 | */
|
74 | deepEqual(expected: Map<T1, T2>): this;
|
75 | }
|