export interface FileStats { hash?: string; lines: number; } export interface ScanStats { [filename: string]: FileStats | undefined; } export interface ScanResults { errors(): Map; all(): ScanStats; selectStats(regex: RegExp): ScanStats; selectFiles(regex: RegExp, baseDir: string): string[]; hash: string; } export declare function scanSync(baseDir: string, regex: RegExp, precomputedHash?: string): ScanResults; export declare function scan(baseDir: string, regex: RegExp, precomputedHash?: string): Promise; /** * Given a base-directory, this function scans the subtree and finds all the js * files. .git and node_module subdirectories are ignored. * @param {!string} baseDir top-level directory to scan * @param {!regex} regex the regular expression that specifies the types of * files to find based on their filename * @param {!function(?Error, Array)} callback error-back callback */ export declare function findFiles(baseDir: string, regex: RegExp): Promise; /** * Given a base-directory, this function scans the subtree and finds all the js * files. .git and node_module subdirectories are ignored. * @param {!string} baseDir top-level directory to scan * @param {!regex} regex the regular expression that specifies the types of * files to find based on their filename * @param {!function(?Error, Array)} callback error-back callback */ export declare function findFilesSync(baseDir: string, regex: RegExp): string[];