/** * @fileoverview PathMatcher - Strategy pattern for file matching * * Provides glob-based file matching with include/exclude patterns. * Supports lazy evaluation and composition. */ /** * Options for PathMatcher. */ export interface PathMatcherOptions { /** Root directory to search from */ readonly cwd: string; /** Glob patterns to include */ readonly include: readonly string[]; /** Glob patterns to exclude */ readonly exclude: readonly string[]; /** Additional exclusion patterns (combined with exclude) */ readonly additionalExcludes?: readonly string[]; } /** * Result of file matching operation. */ export interface MatchResult { /** Matched files (absolute paths) */ readonly files: readonly string[]; /** Files that were excluded */ readonly excluded: readonly string[]; /** Time taken for glob operation in ms */ readonly durationMs: number; } /** * Strategy for matching files based on glob patterns. * Supports both custom patterns and composition. * * @example * ```typescript * const matcher = PathMatcher.create({ * cwd: '/path/to/repo', * include: ['src/**\/*.ts'], * exclude: ['**\/__tests__/**'], * }); * const files = await matcher.files(); * ``` */ export declare class PathMatcher { private readonly options; private constructor(); /** * Create a PathMatcher from options. */ static create(options: PathMatcherOptions): PathMatcher; /** * Get all matching files. * @returns Array of absolute file paths matching the patterns */ files(): Promise; /** * Get detailed match result including timing. */ match(): Promise; /** * Check if a file matches the patterns. * @param filePath - Absolute path to check * @returns True if file matches include patterns and is not excluded */ matches(filePath: string): boolean; /** * Create a new PathMatcher with additional exclusions. */ withExcludes(additionalExcludes: readonly string[]): PathMatcher; /** * Create a new PathMatcher that only includes TypeScript files. */ typescriptOnly(): PathMatcher; /** * Create a new PathMatcher that excludes test files. */ noTests(): PathMatcher; /** Get the current working directory. */ get cwd(): string; /** Get the include patterns. */ get includePatterns(): readonly string[]; /** Get the exclude patterns. */ get excludePatterns(): readonly string[]; } //# sourceMappingURL=path-matcher.d.ts.map