/** * Generic value matcher implementation, shared by url, query and headers matchers. */ import type { ContainsMatcher, RegexMatcher, ValueMatcher, ValueMatcherInit } from '../value-matcher'; export declare function isValueMatcher(v: unknown): v is ContainsMatcher | RegexMatcher; export declare function matchValue(expected: ValueMatcher, actual: unknown): boolean; /** * Converts a bare `RegExp` to a serializable `{ $regex }` matcher. * Passes through null and undefined. */ export declare function serializeRegexp(value: T): T extends RegExp ? RegexMatcher : T; /** * Serializes bare regular expressions in a matcher record. * Passes through null and undefined. */ export declare function serializeRegexpInRecord(record: Record | null | undefined): { [k: string]: string | number | ContainsMatcher | RegexMatcher | null; } | null | undefined; /** * Builds a RegExp from a string. * Accepts either a plain pattern ('foo.*') or a '/pattern/flags' form (consistent with URL's regexp matching). * The '/pattern/flags' form is only used when the trailing part contains valid regex flags, * so a plain pattern that merely starts with '/' is not misinterpreted. */ export declare function regexpFromString(s: string): RegExp; //# sourceMappingURL=value-matcher.d.ts.map