forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglob.d.ts
71 lines (59 loc) · 1.62 KB
/
glob.d.ts
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
// Type definitions for Glob
// Project: https://github.com/isaacs/node-glob
// Definitions by: vvakame <https://github.com/vvakame/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
/// <reference path="../minimatch/minimatch.d.ts" />
declare module "glob" {
import events = require("events");
import minimatch = require("minimatch");
function G(pattern:string, cb:(err:Error, matches:string[])=>void):void;
function G(pattern:string, options:G.IOptions, cb:(err:Error, matches:string[])=>void):void;
module G {
function sync(pattern:string, options?:IOptions):string[];
var Glob:IGlobStatic;
interface IOptions extends minimatch.IOptions {
cwd?: string;
sync?: boolean;
nomount?: boolean;
matchBase?:any;
noglobstar?:any;
strict?: boolean;
dot?:boolean;
mark?:boolean;
nounique?:boolean;
nonull?:boolean;
nosort?:boolean;
nocase?:boolean;
stat?:boolean;
debug?:boolean;
globDebug?:boolean;
silent?:boolean;
}
interface IGlobStatic extends events.EventEmitter {
new (pattern:string, cb?:(err:Error, matches:string[])=>void):IGlob;
new (pattern:string, options:any, cb?:(err:Error, matches:string[])=>void):IGlob;
}
interface IGlob {
EOF:any;
paused:boolean;
maxDepth:number;
maxLength:number;
cache:any;
statCache:any;
changedCwd:boolean;
cwd: string;
root: string;
error: any;
aborted: boolean;
minimatch: minimatch.IMinimatch;
matches:string[];
log(...args:any[]):void;
abort():void;
pause():void;
resume():void;
emitMatch(m:any):void;
}
}
export = G;
}