import { type IOResult } from '../../io/types.ts'; import { type WalkFilters } from './grep_select.ts'; import type { AsyncReadBytesFn, AsyncReaddirFn, AsyncStatFn } from './utils/types.ts'; export interface GrepLinesOptions { invert: boolean; lineNumbers: boolean; countOnly: boolean; filesOnly: boolean; onlyMatching: boolean; maxCount: number | null; } export declare function grepLines(path: string, data: readonly string[], compiled: RegExp, opts: GrepLinesOptions): string[]; export declare function countRecordsHaveMatches(results: readonly string[]): boolean; export declare function nonzeroCountStream(source: AsyncIterable): AsyncIterable; export declare function countExitStream(source: AsyncIterable, io: IOResult): AsyncIterable; export interface GrepStreamOptions { invert: boolean; lineNumbers: boolean; onlyMatching: boolean; maxCount: number | null; countOnly: boolean; afterContext: number; beforeContext: number; } export declare function grepStream(source: AsyncIterable, pat: RegExp, opts: GrepStreamOptions): AsyncIterable; export interface GrepFilesOnlyOptions { recursive: boolean; ignoreCase: boolean; invert: boolean; lineNumbers: boolean; countOnly: boolean; fixedString: boolean; onlyMatching: boolean; maxCount: number | null; wholeWord: boolean; basic: boolean; filters?: WalkFilters; } export declare function grepRecursive(readdirFn: AsyncReaddirFn, statFn: AsyncStatFn, readBytesFn: AsyncReadBytesFn, path: string, compiled: RegExp, opts: GrepFilesOnlyOptions, warnings: string[] | null, filesOnly?: boolean): Promise; export declare function exitCodeFor(matched: boolean, failed: boolean, quiet: boolean): number; export declare function grepFilesOnly(readdirFn: AsyncReaddirFn, statFn: AsyncStatFn, readBytesFn: AsyncReadBytesFn, path: string, pattern: string, opts: GrepFilesOnlyOptions, warnings?: string[] | null): Promise; export declare function prefixLines(source: AsyncIterable, prefix: string): AsyncIterable; //# sourceMappingURL=grep_scan.d.ts.map