mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge pull request #2252 from Bartvds/def/minimatch
added filter method to minimatch
This commit is contained in:
@@ -11,3 +11,5 @@ var r = m.makeRe();
|
||||
|
||||
var f = ["test.ts"];
|
||||
mm.match(f, pattern, options);
|
||||
|
||||
mm.filter('foo')('bar');
|
||||
|
||||
Vendored
+7
-6
@@ -8,7 +8,8 @@ declare module "minimatch" {
|
||||
function M(target:string, pattern:string, options?:M.IOptions):void;
|
||||
|
||||
module M {
|
||||
function match(filenames:string[], pattern:string, options:IOptions):string[];
|
||||
function match(filenames:string[], pattern:string, options?:IOptions):string[];
|
||||
function filter(pattern:string, options?:IOptions): (target: string) => boolean;
|
||||
|
||||
var Minimatch:IMinimatchStatic;
|
||||
|
||||
@@ -27,7 +28,7 @@ declare module "minimatch" {
|
||||
}
|
||||
|
||||
interface IMinimatchStatic {
|
||||
new (pattern:string, options:IOptions):IMinimatch;
|
||||
new (pattern:string, options?:IOptions):IMinimatch;
|
||||
}
|
||||
|
||||
interface IMinimatch {
|
||||
@@ -36,11 +37,11 @@ declare module "minimatch" {
|
||||
parseNegate():void;
|
||||
braceExpand(pattern:string, options:IOptions):void;
|
||||
parse(pattern:string, isSub?:boolean):void;
|
||||
makeRe():any; // regexp or boolean
|
||||
match(file:string, pattern:string, options:IOptions):boolean;
|
||||
matchOne(file:string, pattern:string, partial:any):boolean;
|
||||
makeRe():RegExp; // regexp or boolean
|
||||
match(file:string):boolean;
|
||||
matchOne(files:string[], pattern:string[], partial:any):boolean;
|
||||
}
|
||||
}
|
||||
|
||||
export = M;
|
||||
export = M;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user