/** * Minimal but faithful `.gitignore` matcher for the indexer. * * Supports the parts of the gitignore spec that matter for skipping source * files: comments / blanks, `!` negation (last match wins), trailing-slash * directory-only rules, leading-slash / embedded-slash anchoring, and the * `*` / `**` / `?` / `[...]` globs (via core's {@link compileGlobMatcher}). * * Only the project-root `.gitignore` is read. Nested `.gitignore` files are not * walked — the common build/dependency dirs that would live deeper are already * covered by the indexer's always-on `DEFAULT_IGNORE`. * * Known limitation: a `!negated` file inside an ignored directory will not be * re-included, because the indexer prunes ignored directories before descending * (a large performance win). This matches most lightweight implementations. */ export type IgnoreMatcher = (relPath: string, isDir: boolean) => boolean; /** Compile a list of raw `.gitignore` lines into a matcher. */ export declare function compileGitignore(lines: string[]): IgnoreMatcher; /** Read `/.gitignore` and compile it. Missing file → matches nothing. */ export declare function loadGitignoreMatcher(projectRoot: string): Promise; //# sourceMappingURL=gitignore.d.ts.map