//#region src/fuzzy.d.ts interface FuzzyOptions { /** Cap the returned list. Applied after ranking. */ limit?: number; /** * Allow terms to match out of authored order. `false` means `"bg prim"` * only matches when `bg` appears before `prim` in the haystack entry; * `true` also accepts `"prim bg"`. Defaults to `true` — token paths read * left-to-right in DTCG convention, but user queries often don't. */ outOfOrder?: boolean; } /** * Rank-ordered fuzzy filter. Empty / whitespace-only queries return the * items unchanged in their input order. Non-empty queries return only * matching items, ranked by uFuzzy's default scoring (boundary / prefix * quality, tighter matches first). Ties fall back to input order. * * The matcher is configured for short identifier-style haystacks — token * paths, CSS variable names — with single-character typo tolerance * (`intraMode: SingleError`) and generous allowance for extra characters * between the needle's terms (`interIns: 8`), which covers multi-segment * paths like `color.surface.default` searched with `"surf def"`. */ declare function fuzzyFilter(items: readonly T[], query: string, key: (item: T) => string, options?: FuzzyOptions): T[]; /** * Test a single string against a query. Convenience wrapper for * single-value predicates (e.g. tree pruning where each leaf is tested * independently). Empty query matches everything. */ declare function fuzzyMatches(haystack: string, query: string): boolean; //#endregion export { FuzzyOptions, fuzzyFilter, fuzzyMatches }; //# sourceMappingURL=fuzzy.d.mts.map