/** * Pattern type classification for targets and excludes. */ export type PatternType = 'literal' | 'glob' | 'regex'; /** * Detect the type of a pattern string. * * Rules: * - Regex: Starts and ends with `/`, and the content between doesn't contain unescaped `/` * Example: `/\.conf$/`, `/test/` (simple) * - Glob: Contains glob metacharacters: `*`, `?`, `{` * Example: `*.conf`, `~/.config/{a,b}` * - Literal: Everything else * Example: `~/.zshrc`, `/usr/local/bin` * * Special handling for absolute paths vs regex: * - `/usr/local/bin` is literal (multiple `/` inside, not at boundaries) * - `/test/` is regex (starts and ends with `/`, single segment inside) * - `/\.conf$/` is regex (starts and ends with `/`, no unescaped `/` inside) */ export declare function detectPatternType(pattern: string): PatternType; /** * Parse a regex pattern string (e.g., `/\.conf$/`) into a RegExp object. * * @throws {Error} If the pattern is invalid regex syntax */ export declare function parseRegexPattern(pattern: string): RegExp; /** * Create an optimized exclude matcher function. * * This function pre-compiles all patterns for efficient repeated matching. * It handles three pattern types: glob, regex, and literal. * * @param excludePatterns - Array of exclude pattern strings * @returns A function that tests if a file path should be excluded */ export declare function createExcludeMatcher(excludePatterns: string[]): (filePath: string) => boolean; /** * Validate that a pattern string is well-formed. * * Used for schema validation at config load time. * * @param pattern - Pattern string to validate * @returns true if valid, false otherwise */ export declare function isValidPattern(pattern: string): boolean;