1 | # Installation
|
2 | > `npm install --save @types/bash-glob`
|
3 |
|
4 | # Summary
|
5 | This package contains type definitions for bash-glob (https://github.com/micromatch/bash-glob).
|
6 |
|
7 | # Details
|
8 | Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/bash-glob.
|
9 | ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/bash-glob/index.d.ts)
|
10 | ````ts
|
11 | // Type definitions for bash-glob 2.0
|
12 | // Project: https://github.com/micromatch/bash-glob
|
13 | // Definitions by: mrmlnc <https://github.com/mrmlnc>
|
14 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
15 |
|
16 | type Patterns = string | string[];
|
17 | type Callback = (err: Error, files: string[]) => void;
|
18 |
|
19 | declare function bashGlob(pattern: Patterns, callback: Callback): void;
|
20 | declare function bashGlob(pattern: Patterns, options: bashGlob.Options, callback: Callback): void;
|
21 |
|
22 | declare namespace bashGlob {
|
23 | interface Options {
|
24 | cwd?: string | undefined;
|
25 | dot?: boolean | undefined;
|
26 | dotglob?: boolean | undefined;
|
27 | extglob?: boolean | undefined;
|
28 | failglob?: boolean | undefined;
|
29 | globstar?: boolean | undefined;
|
30 | nocase?: boolean | undefined;
|
31 | nocaseglob?: boolean | undefined;
|
32 | nullglob?: boolean | undefined;
|
33 | }
|
34 |
|
35 | function on(event: 'match' | 'files', callback: (files: string, cwd: string) => void): void;
|
36 | function on(event: 'end', callback: (files: string) => void): void;
|
37 |
|
38 | function each(patterns: Patterns, callback: Callback): void;
|
39 | function each(patterns: Patterns, options: Options, callback: Callback): void;
|
40 |
|
41 | function promise(patterns: Patterns, options?: Options): Promise<string[]>;
|
42 |
|
43 | function sync(patterns: Patterns, options?: Options): string[];
|
44 | }
|
45 |
|
46 | export = bashGlob;
|
47 |
|
48 | ````
|
49 |
|
50 | ### Additional Details
|
51 | * Last updated: Wed, 07 Jul 2021 21:44:52 GMT
|
52 | * Dependencies: none
|
53 | * Global values: none
|
54 |
|
55 | # Credits
|
56 | These definitions were written by [mrmlnc](https://github.com/mrmlnc).
|
57 |
|
\ | No newline at end of file |