import type { SearchMatch } from "../index.js"; export declare const SEARCH_MATCHES: readonly SearchMatch[]; export declare const isSearchMatch: (value: string) => value is SearchMatch; /** * Bounds on an untrusted search pattern. Globs and regexes both run on a * backtracking engine, where each unbounded wildcard/quantifier multiplies the * worst-case work per key (`*a*a*a…*b` is polynomial in the key length), so the * gateway caps how many a pattern may carry before it compiles one. */ export interface SearchPatternLimits { /** Longest accepted pattern, in characters. */ maxLength: number; /** Most unbounded wildcards/quantifiers (`*`, `**`, `+`, `{n,}`) allowed. */ maxWildcards: number; } /** * Count the unbounded quantifiers in a regex `source` along its most expensive * alternative, or `Infinity` when one is nested inside another (`(a+)+`, * `(?:.*a){10}` — exponential, or a bounded repeat of an unbounded one). A * lexical scan, not a full parser: escapes and character classes are skipped, * and anything it can't read as a quantifier is treated as a plain atom. */ export declare const countUnboundedQuantifiers: (source: string) => number; /** * Why `pattern` exceeds `limits`, or `undefined` when it is within them. * Substring/exact patterns are only length-checked (they compile to a plain * `includes`/`===`); globs are measured on picomatch's compiled regex so `**`, * braces, and extglobs count exactly as they will run. */ export declare const searchPatternProblem: (pattern: string | RegExp, match: SearchMatch, caseInsensitive: boolean, limits: SearchPatternLimits) => string | undefined; export declare const buildSearchMatcher: (pattern: string | RegExp, match: SearchMatch, caseInsensitive: boolean) => ((key: string) => boolean); //# sourceMappingURL=search-matcher.d.ts.map