1 | import { Shape } from '../utils/match-shape';
|
2 | import { Predicate, PredicateOptions } from './predicate';
|
3 | import { BasePredicate } from './base-predicate';
|
4 | export { Shape };
|
5 | export declare class ObjectPredicate extends Predicate<object> {
|
6 | |
7 |
|
8 |
|
9 | constructor(options?: PredicateOptions);
|
10 | /**
|
11 | Test if an Object is a plain object.
|
12 | */
|
13 | get plain(): this;
|
14 | /**
|
15 | Test an object to be empty.
|
16 | */
|
17 | get empty(): this;
|
18 | /**
|
19 | Test an object to be not empty.
|
20 | */
|
21 | get nonEmpty(): this;
|
22 | /**
|
23 | Test all the values in the object to match the provided predicate.
|
24 |
|
25 | @param predicate - The predicate that should be applied against every value in the object.
|
26 | */
|
27 | valuesOfType<T>(predicate: BasePredicate<T>): this;
|
28 | /**
|
29 | Test all the values in the object deeply to match the provided predicate.
|
30 |
|
31 | @param predicate - The predicate that should be applied against every value in the object.
|
32 | */
|
33 | deepValuesOfType<T>(predicate: Predicate<T>): this;
|
34 | /**
|
35 | Test an object to be deeply equal to the provided object.
|
36 |
|
37 | @param expected - Expected object to match.
|
38 | */
|
39 | deepEqual(expected: object): this;
|
40 | /**
|
41 | Test an object to be of a specific instance type.
|
42 |
|
43 | @param instance - The expected instance type of the object.
|
44 | */
|
45 | instanceOf(instance: Function): this;
|
46 | /**
|
47 | Test an object to include all the provided keys. You can use [dot-notation](https:
|
48 |
|
49 | @param keys - The keys that should be present in the object.
|
50 | */
|
51 | hasKeys(...keys: readonly string[]): this;
|
52 | |
53 |
|
54 |
|
55 |
|
56 |
|
57 | hasAnyKeys(...keys: readonly string[]): this;
|
58 | |
59 |
|
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 |
|
73 |
|
74 |
|
75 |
|
76 |
|
77 |
|
78 |
|
79 | partialShape(shape: Shape): this;
|
80 | |
81 |
|
82 |
|
83 |
|
84 |
|
85 |
|
86 |
|
87 |
|
88 |
|
89 |
|
90 |
|
91 |
|
92 |
|
93 |
|
94 |
|
95 |
|
96 | exactShape(shape: Shape): this;
|
97 | }
|
98 |
|
\ | No newline at end of file |