From af6197ad3786a8164c35141cba981ff2bbb2637b Mon Sep 17 00:00:00 2001 From: Rogier Schouten Date: Fri, 14 Nov 2014 11:28:52 +0100 Subject: [PATCH] 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! --- minimatch/minimatch-tests.ts | 4 ++++ minimatch/minimatch.d.ts | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/minimatch/minimatch-tests.ts b/minimatch/minimatch-tests.ts index a4892ef35..382a2c0a8 100644 --- a/minimatch/minimatch-tests.ts +++ b/minimatch/minimatch-tests.ts @@ -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); diff --git a/minimatch/minimatch.d.ts b/minimatch/minimatch.d.ts index e83d976a8..697f9e21f 100644 --- a/minimatch/minimatch.d.ts +++ b/minimatch/minimatch.d.ts @@ -1,11 +1,11 @@ -// Type definitions for Minimatch +// Type definitions for Minimatch 1.0.0 // Project: https://github.com/isaacs/minimatch // Definitions by: 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[];