Skip to content

Commit a3900b8

Browse files
author
itokentr
committed
minimatch: Update to v2.0.8
1 parent a14d724 commit a3900b8

File tree

2 files changed

+45
-28
lines changed

2 files changed

+45
-28
lines changed

minimatch/minimatch-tests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var r = m.makeRe();
1212
var f = ["test.ts"];
1313
mm.match(f, pattern, options);
1414

15-
mm.filter('foo')('bar');
15+
f.filter(mm.filter(pattern, options));
1616

1717
var s: string = "hello";
1818
var b: boolean = mm(s, pattern, options);

minimatch/minimatch.d.ts

Lines changed: 44 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,64 @@
1-
// Type definitions for Minimatch 1.0.0
1+
// Type definitions for Minimatch 2.0.8
22
// Project: https://github.com/isaacs/minimatch
33
// Definitions by: vvakame <https://github.com/vvakame/>
44
// Definitions: https://github.com/borisyankov/DefinitelyTyped
55

66
declare module "minimatch" {
77

8-
function M(target:string, pattern:string, options?:M.IOptions): boolean;
8+
function M(target: string, pattern: string, options?: M.IOptions): boolean;
99

1010
module M {
11-
function match(filenames:string[], pattern:string, options?:IOptions):string[];
12-
function filter(pattern:string, options?:IOptions): (target: string) => boolean;
13-
14-
var Minimatch:IMinimatchStatic;
11+
function match(list: string[], pattern: string, options?: IOptions): string[];
12+
function filter(pattern: string, options?: IOptions): (element: string, indexed: number, array: string[]) => boolean;
13+
function makeRe(pattern: string, options?: IOptions): RegExp;
1514

15+
var Minimatch: IMinimatchStatic;
16+
1617
interface IOptions {
17-
debug?:boolean;
18-
nobrace?:boolean;
19-
noglobstar?:boolean;
20-
dot?:boolean;
21-
noext?:boolean;
22-
nocase?:boolean;
23-
nonull?:boolean;
24-
matchBase?:boolean;
25-
nocomment?:boolean;
26-
nonegate?:boolean;
27-
flipNegate?:boolean;
18+
debug?: boolean;
19+
nobrace?: boolean;
20+
noglobstar?: boolean;
21+
dot?: boolean;
22+
noext?: boolean;
23+
nocase?: boolean;
24+
nonull?: boolean;
25+
matchBase?: boolean;
26+
nocomment?: boolean;
27+
nonegate?: boolean;
28+
flipNegate?: boolean;
2829
}
2930

3031
interface IMinimatchStatic {
31-
new (pattern:string, options?:IOptions):IMinimatch;
32+
new (pattern: string, options?: IOptions): IMinimatch;
33+
prototype: IMinimatch;
3234
}
3335

3436
interface IMinimatch {
35-
debug():void;
36-
make():void;
37-
parseNegate():void;
38-
braceExpand(pattern:string, options:IOptions):void;
39-
parse(pattern:string, isSub?:boolean):void;
40-
makeRe():RegExp; // regexp or boolean
41-
match(file:string):boolean;
42-
matchOne(files:string[], pattern:string[], partial:any):boolean;
37+
pattern: string;
38+
options: IOptions;
39+
/** 2-dimensional array of regexp or string expressions. */
40+
set: any[][]; // (RegExp | string)[][]
41+
regexp: RegExp;
42+
negate: boolean;
43+
comment: boolean;
44+
empty: boolean;
45+
46+
makeRe(): RegExp; // regexp or boolean
47+
match(fname: string): boolean;
48+
matchOne(files: string[], pattern: string[], partial: boolean): boolean;
49+
50+
/** Deprecated. For internal use. */
51+
debug(): void;
52+
/** Deprecated. For internal use. */
53+
make(): void;
54+
/** Deprecated. For internal use. */
55+
parseNegate(): void;
56+
/** Deprecated. For internal use. */
57+
braceExpand(pattern: string, options: IOptions): void;
58+
/** Deprecated. For internal use. */
59+
parse(pattern: string, isSub?: boolean): void;
4360
}
4461
}
4562

46-
export = M;
63+
export = M;
4764
}

0 commit comments

Comments
 (0)