UNPKG

581 BTypeScriptView Raw
1/// <reference types="node" />
2
3import * as fs from "fs";
4declare namespace RecursiveReaddir {
5 type IgnoreFunction = (file: string, stats: fs.Stats) => boolean;
6 type Ignores = ReadonlyArray<string | IgnoreFunction>;
7 type Callback = (error: Error, files: string[]) => void;
8 interface readDir {
9 (path: string, ignores?: Ignores): Promise<string[]>;
10 (path: string, callback: Callback): void;
11 (path: string, ignores: Ignores, callback: Callback): void;
12 }
13}
14
15declare var recursiveReadDir: RecursiveReaddir.readDir;
16export = recursiveReadDir;