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!
This commit is contained in:
Rogier Schouten 2014-11-14 11:28:52 +01:00
parent a6b1e4ff84
commit af6197ad37
2 changed files with 6 additions and 2 deletions

View File

@ -13,3 +13,7 @@ var f = ["test.ts"];
mm.match(f, pattern, options);
mm.filter('foo')('bar');
var s: string = "hello";
var b: boolean = mm(s, pattern, options);
var b: boolean = mm(s, pattern);

View File

@ -1,11 +1,11 @@
// Type definitions for Minimatch
// 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):void;
function M(target:string, pattern:string, options?:M.IOptions): boolean;
module M {
function match(filenames:string[], pattern:string, options?:IOptions):string[];