1 | export type MatcherFn<T> = (actualValue: T) => boolean;
|
2 | export declare class Matcher<T> {
|
3 | readonly asymmetricMatch: MatcherFn<T>;
|
4 | private readonly description;
|
5 | $$typeof: symbol;
|
6 | inverse?: boolean;
|
7 | constructor(asymmetricMatch: MatcherFn<T>, description: string);
|
8 | toString(): string;
|
9 | toAsymmetricMatcher(): string;
|
10 | getExpectedType(): string;
|
11 | }
|
12 | export declare class CaptorMatcher<T> {
|
13 | $$typeof: symbol;
|
14 | readonly asymmetricMatch: MatcherFn<T>;
|
15 | readonly value: T;
|
16 | readonly values: T[];
|
17 | constructor();
|
18 | getExpectedType(): string;
|
19 | toString(): string;
|
20 | toAsymmetricMatcher(): string;
|
21 | }
|
22 | export interface MatcherCreator<T, E = T> {
|
23 | (expectedValue?: E): Matcher<T>;
|
24 | }
|
25 | export type MatchersOrLiterals<Y extends any[]> = {
|
26 | [K in keyof Y]: Matcher<Y[K]> | Y[K];
|
27 | };
|
28 | export declare const any: MatcherCreator<any>;
|
29 | export declare const anyBoolean: MatcherCreator<boolean>;
|
30 | export declare const anyNumber: MatcherCreator<number>;
|
31 | export declare const anyString: MatcherCreator<string>;
|
32 | export declare const anyFunction: MatcherCreator<Function>;
|
33 | export declare const anySymbol: MatcherCreator<Symbol>;
|
34 | export declare const anyObject: MatcherCreator<any>;
|
35 | export declare const anyArray: MatcherCreator<any[]>;
|
36 | export declare const anyMap: MatcherCreator<Map<any, any>>;
|
37 | export declare const anySet: MatcherCreator<Set<any>>;
|
38 | export declare const isA: MatcherCreator<any>;
|
39 | export declare const arrayIncludes: MatcherCreator<any[], any>;
|
40 | export declare const setHas: MatcherCreator<Set<any>, any>;
|
41 | export declare const mapHas: MatcherCreator<Map<any, any>, any>;
|
42 | export declare const objectContainsKey: MatcherCreator<any, string>;
|
43 | export declare const objectContainsValue: MatcherCreator<any>;
|
44 | export declare const notNull: MatcherCreator<any>;
|
45 | export declare const notUndefined: MatcherCreator<any>;
|
46 | export declare const notEmpty: MatcherCreator<any>;
|
47 | export declare const captor: <T extends unknown = any>() => CaptorMatcher<T>;
|
48 | export declare const matches: <T extends unknown = any>(matcher: MatcherFn<T>) => Matcher<T>;
|