1 | type Patterns = string | string[];
|
2 | type Callback = (err: Error, files: string[]) => void;
|
3 |
|
4 | declare function bashGlob(pattern: Patterns, callback: Callback): void;
|
5 | declare function bashGlob(pattern: Patterns, options: bashGlob.Options, callback: Callback): void;
|
6 |
|
7 | declare namespace bashGlob {
|
8 | interface Options {
|
9 | cwd?: string | undefined;
|
10 | dot?: boolean | undefined;
|
11 | dotglob?: boolean | undefined;
|
12 | extglob?: boolean | undefined;
|
13 | failglob?: boolean | undefined;
|
14 | globstar?: boolean | undefined;
|
15 | nocase?: boolean | undefined;
|
16 | nocaseglob?: boolean | undefined;
|
17 | nullglob?: boolean | undefined;
|
18 | }
|
19 |
|
20 | function on(event: "match" | "files", callback: (files: string, cwd: string) => void): void;
|
21 | function on(event: "end", callback: (files: string) => void): void;
|
22 |
|
23 | function each(patterns: Patterns, callback: Callback): void;
|
24 | function each(patterns: Patterns, options: Options, callback: Callback): void;
|
25 |
|
26 | function promise(patterns: Patterns, options?: Options): Promise<string[]>;
|
27 |
|
28 | function sync(patterns: Patterns, options?: Options): string[];
|
29 | }
|
30 |
|
31 | export = bashGlob;
|