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