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