|
1 |
| -// Type definitions for Minimatch 1.0.0 |
| 1 | +// Type definitions for Minimatch 2.0.8 |
2 | 2 | // Project: https://github.com/isaacs/minimatch
|
3 | 3 | // Definitions by: vvakame <https://github.com/vvakame/>
|
4 | 4 | // Definitions: https://github.com/borisyankov/DefinitelyTyped
|
5 | 5 |
|
6 | 6 | declare module "minimatch" {
|
7 | 7 |
|
8 |
| - function M(target:string, pattern:string, options?:M.IOptions): boolean; |
| 8 | + function M(target: string, pattern: string, options?: M.IOptions): boolean; |
9 | 9 |
|
10 | 10 | 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; |
15 | 14 |
|
| 15 | + var Minimatch: IMinimatchStatic; |
| 16 | + |
16 | 17 | 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; |
28 | 29 | }
|
29 | 30 |
|
30 | 31 | interface IMinimatchStatic {
|
31 |
| - new (pattern:string, options?:IOptions):IMinimatch; |
| 32 | + new (pattern: string, options?: IOptions): IMinimatch; |
| 33 | + prototype: IMinimatch; |
32 | 34 | }
|
33 | 35 |
|
34 | 36 | 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; |
43 | 60 | }
|
44 | 61 | }
|
45 | 62 |
|
46 |
| -export = M; |
| 63 | + export = M; |
47 | 64 | }
|
0 commit comments