Files
DefinitelyTyped/minimatch/minimatch.d.ts
Rogier Schouten af6197ad37 Bugfix in minimatch.d.ts
From README.md:  the exported function returns a boolean not a void.

var minimatch = require("minimatch")
minimatch("bar.foo", "*.foo") // true!
2014-11-14 11:28:52 +01:00

48 lines
1.2 KiB
TypeScript

// Type definitions for Minimatch 1.0.0
// Project: https://github.com/isaacs/minimatch
// Definitions by: vvakame <https://github.com/vvakame/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "minimatch" {
function M(target:string, pattern:string, options?:M.IOptions): boolean;
module M {
function match(filenames:string[], pattern:string, options?:IOptions):string[];
function filter(pattern:string, options?:IOptions): (target: string) => boolean;
var Minimatch:IMinimatchStatic;
interface IOptions {
debug?:boolean;
nobrace?:boolean;
noglobstar?:boolean;
dot?:boolean;
noext?:boolean;
nocase?:boolean;
nonull?:boolean;
matchBase?:boolean;
nocomment?:boolean;
nonegate?:boolean;
flipNegate?:boolean;
}
interface IMinimatchStatic {
new (pattern:string, options?:IOptions):IMinimatch;
}
interface IMinimatch {
debug():void;
make():void;
parseNegate():void;
braceExpand(pattern:string, options:IOptions):void;
parse(pattern:string, isSub?:boolean):void;
makeRe():RegExp; // regexp or boolean
match(file:string):boolean;
matchOne(files:string[], pattern:string[], partial:any):boolean;
}
}
export = M;
}