forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathglob_v7.x.x.js
79 lines (69 loc) · 2.29 KB
/
glob_v7.x.x.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
// flow-typed signature: d2a519d7d007e9ba3e5bf2ac3ff76eca
// flow-typed version: f243e51ed7/glob_v7.x.x/flow_>=v0.104.x
declare module "glob" {
declare type MinimatchOptions = {|
debug?: boolean,
nobrace?: boolean,
noglobstar?: boolean,
dot?: boolean,
noext?: boolean,
nocase?: boolean,
nonull?: boolean,
matchBase?: boolean,
nocomment?: boolean,
nonegate?: boolean,
flipNegate?: boolean
|};
declare type Options = {|
...MinimatchOptions,
cwd?: string,
root?: string,
nomount?: boolean,
mark?: boolean,
nosort?: boolean,
stat?: boolean,
silent?: boolean,
strict?: boolean,
cache?: { [path: string]: boolean | "DIR" | "FILE" | $ReadOnlyArray<string>, ... },
statCache?: { [path: string]: boolean | { isDirectory(): boolean, ... } | void, ... },
symlinks?: { [path: string]: boolean | void, ... },
realpathCache?: { [path: string]: string, ... },
sync?: boolean,
nounique?: boolean,
nodir?: boolean,
ignore?: string | $ReadOnlyArray<string>,
follow?: boolean,
realpath?: boolean,
absolute?: boolean
|};
/**
* Called when an error occurs, or matches are found
* err
* matches: filenames found matching the pattern
*/
declare type CallBack = (err: ?Error, matches: Array<string>) => void;
declare class Glob extends events$EventEmitter {
constructor(pattern: string): this;
constructor(pattern: string, callback: CallBack): this;
constructor(pattern: string, options: Options, callback: CallBack): this;
minimatch: {...};
options: Options;
aborted: boolean;
cache: { [path: string]: boolean | "DIR" | "FILE" | $ReadOnlyArray<string>, ... };
statCache: { [path: string]: boolean | { isDirectory(): boolean, ... } | void, ... };
symlinks: { [path: string]: boolean | void, ... };
realpathCache: { [path: string]: string, ... };
found: Array<string>;
pause(): void;
resume(): void;
abort(): void;
}
declare class GlobModule {
Glob: Class<Glob>;
(pattern: string, callback: CallBack): void;
(pattern: string, options: Options, callback: CallBack): void;
hasMagic(pattern: string, options?: Options): boolean;
sync(pattern: string, options?: Options): Array<string>;
}
declare module.exports: GlobModule;
}