Skip to content

Commit a14d724

Browse files
author
itokentr
committed
glob: Update to 5.0.10
1 parent 448c350 commit a14d724

File tree

1 file changed

+80
-39
lines changed

1 file changed

+80
-39
lines changed

glob/glob.d.ts

Lines changed: 80 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Type definitions for Glob
1+
// Type definitions for Glob 5.0.10
22
// Project: https://github.com/isaacs/node-glob
33
// Definitions by: vvakame <https://github.com/vvakame/>
44
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -9,63 +9,104 @@
99
declare module "glob" {
1010

1111
import events = require("events");
12+
import fs = require('fs');
1213
import minimatch = require("minimatch");
1314

14-
function G(pattern:string, cb:(err:Error, matches:string[])=>void):void;
15-
16-
function G(pattern:string, options:G.IOptions, cb:(err:Error, matches:string[])=>void):void;
15+
function G(pattern: string, cb: (err: Error, matches: string[]) => void): void;
16+
function G(pattern: string, options: G.IOptions, cb: (err: Error, matches: string[]) => void): void;
1717

1818
module G {
19-
function sync(pattern:string, options?:IOptions):string[];
19+
function sync(pattern: string, options?: IOptions): string[];
20+
21+
function hasMagic(pattern: string, options?: IOptions): boolean;
2022

21-
var Glob:IGlobStatic;
23+
var Glob: IGlobStatic;
24+
var GlobSync: IGlobSyncStatic;
2225

2326
interface IOptions extends minimatch.IOptions {
2427
cwd?: string;
25-
sync?: boolean;
28+
root?: string;
29+
dot?: boolean;
2630
nomount?: boolean;
27-
matchBase?:any;
28-
noglobstar?:any;
31+
mark?: boolean;
32+
nosort?: boolean;
33+
stat?: boolean;
34+
silent?: boolean;
2935
strict?: boolean;
30-
dot?:boolean;
31-
mark?:boolean;
32-
nounique?:boolean;
33-
nonull?:boolean;
34-
nosort?:boolean;
35-
nocase?:boolean;
36-
stat?:boolean;
37-
debug?:boolean;
38-
globDebug?:boolean;
39-
silent?:boolean;
36+
cache?: { [path: string]: any /* boolean | string | string[] */ };
37+
statCache?: { [path: string]: fs.Stats };
38+
symlinks?: any;
39+
sync?: boolean;
40+
nounique?: boolean;
41+
nonull?: boolean;
42+
debug?: boolean;
43+
nobrace?: boolean;
44+
noglobstar?: boolean;
45+
noext?: boolean;
46+
nocase?: boolean;
47+
matchBase?: any;
48+
nodir?: boolean;
49+
ignore?: any; /* string | string[] */
50+
follow?: boolean;
51+
realpath?: boolean;
52+
nonegate?: boolean;
53+
nocomment?: boolean;
54+
55+
/** Deprecated. */
56+
globDebug?: boolean;
4057
}
4158

4259
interface IGlobStatic extends events.EventEmitter {
43-
new (pattern:string, cb?:(err:Error, matches:string[])=>void):IGlob;
44-
new (pattern:string, options:any, cb?:(err:Error, matches:string[])=>void):IGlob;
60+
new (pattern: string, cb?: (err: Error, matches: string[]) => void): IGlob;
61+
new (pattern: string, options: IOptions, cb?: (err: Error, matches: string[]) => void): IGlob;
62+
prototype: IGlob;
63+
}
64+
65+
interface IGlobSyncStatic {
66+
new (pattern: string, options?: IOptions): IGlobBase
67+
prototype: IGlobBase;
4568
}
4669

47-
interface IGlob {
48-
EOF:any;
49-
paused:boolean;
50-
maxDepth:number;
51-
maxLength:number;
52-
cache:any;
53-
statCache:any;
54-
changedCwd:boolean;
70+
interface IGlobBase {
71+
minimatch: minimatch.IMinimatch;
72+
options: IOptions;
73+
aborted: boolean;
74+
cache: { [path: string]: any /* boolean | string | string[] */ };
75+
statCache: { [path: string]: fs.Stats };
76+
symlinks: { [path: string]: boolean };
77+
realpathCache: { [path: string]: string };
78+
found: string[];
79+
}
80+
81+
interface IGlob extends IGlobBase, events.EventEmitter {
82+
pause(): void;
83+
resume(): void;
84+
abort(): void;
85+
86+
/** Deprecated. */
87+
EOF: any;
88+
/** Deprecated. */
89+
paused: boolean;
90+
/** Deprecated. */
91+
maxDepth: number;
92+
/** Deprecated. */
93+
maxLength: number;
94+
/** Deprecated. */
95+
changedCwd: boolean;
96+
/** Deprecated. */
5597
cwd: string;
98+
/** Deprecated. */
5699
root: string;
100+
/** Deprecated. */
57101
error: any;
58-
aborted: boolean;
59-
minimatch: minimatch.IMinimatch;
60-
matches:string[];
61-
62-
log(...args:any[]):void;
63-
abort():void;
64-
pause():void;
65-
resume():void;
66-
emitMatch(m:any):void;
102+
/** Deprecated. */
103+
matches: string[];
104+
/** Deprecated. */
105+
log(...args: any[]): void;
106+
/** Deprecated. */
107+
emitMatch(m: any): void;
67108
}
68109
}
69110

70-
export = G;
111+
export = G;
71112
}

0 commit comments

Comments
 (0)