From b04b6b41e1b4a062b7454c9a9b84ebef0335ba80 Mon Sep 17 00:00:00 2001 From: Phips Peter Date: Sun, 8 Mar 2015 10:39:42 -0700 Subject: [PATCH 1/2] The mocha options are optional This was frustrating before if you wanted to use gulp mocha without customization. --- gulp-mocha/gulp-mocha.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulp-mocha/gulp-mocha.d.ts b/gulp-mocha/gulp-mocha.d.ts index e6bc099c3..8d21b1323 100644 --- a/gulp-mocha/gulp-mocha.d.ts +++ b/gulp-mocha/gulp-mocha.d.ts @@ -7,6 +7,6 @@ /// declare module "gulp-mocha" { - function mocha(setupOptions: MochaSetupOptions): NodeJS.ReadWriteStream; + function mocha(setupOptions?: MochaSetupOptions): NodeJS.ReadWriteStream; export = mocha; } \ No newline at end of file From afdc4fb569ec4a983ac137f3dc4dff972705eccd Mon Sep 17 00:00:00 2001 From: Phips Peter Date: Sun, 8 Mar 2015 10:42:04 -0700 Subject: [PATCH 2/2] Adding a function for gulp-replace Adding a function for replacing strings. --- gulp-replace/gulp-replace.d.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gulp-replace/gulp-replace.d.ts b/gulp-replace/gulp-replace.d.ts index 6607da98c..cf6ef7164 100644 --- a/gulp-replace/gulp-replace.d.ts +++ b/gulp-replace/gulp-replace.d.ts @@ -10,8 +10,12 @@ declare module "gulp-replace" { skipBinary?: boolean; } - function replace(pattern: string, replacement: string, opts?: Options): NodeJS.ReadWriteStream; - function replace(pattern: RegExp, replacement: string, opts?: Options): NodeJS.ReadWriteStream; + interface Replacer { + (match: string): string + } + + function replace(pattern: string, replacement: string | Replacer, opts?: Options): NodeJS.ReadWriteStream; + function replace(pattern: RegExp, replacement: string | Replacer, opts?: Options): NodeJS.ReadWriteStream; export = replace; } \ No newline at end of file