From fd21da7d92a8b4f873ba000b2d566c712243198e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Menezes?= Date: Fri, 10 Mar 2017 20:02:04 -0300 Subject: [PATCH] Add gulp-batch declaration files (#14832) --- gulp-batch/gulp-batch-tests.ts | 8 ++++++++ gulp-batch/index.d.ts | 8 ++++++++ gulp-batch/tsconfig.json | 22 ++++++++++++++++++++++ gulp-batch/tslint.json | 1 + 4 files changed, 39 insertions(+) create mode 100644 gulp-batch/gulp-batch-tests.ts create mode 100644 gulp-batch/index.d.ts create mode 100644 gulp-batch/tsconfig.json create mode 100644 gulp-batch/tslint.json diff --git a/gulp-batch/gulp-batch-tests.ts b/gulp-batch/gulp-batch-tests.ts new file mode 100644 index 0000000000..a1e305c03b --- /dev/null +++ b/gulp-batch/gulp-batch-tests.ts @@ -0,0 +1,8 @@ +import * as gulp from "gulp"; +import * as batch from "gulp-batch"; + +gulp.task('default', function() { + gulp.watch([ 'lib/**', 'test/**' ], batch((events: any, cb: any) => { + events.on('data', console.log).on('end', cb); + })); +}); diff --git a/gulp-batch/index.d.ts b/gulp-batch/index.d.ts new file mode 100644 index 0000000000..a3be8e252e --- /dev/null +++ b/gulp-batch/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for gulp-batch 1.0 +// Project: https://github.com/floatdrop/gulp-batch +// Definitions by: Alvaro Menezes , Vinicius Salomao +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function batch(opts?: any, cb?: any, errorHandler?: any): (event: any) => void; +declare namespace batch { } +export = batch; diff --git a/gulp-batch/tsconfig.json b/gulp-batch/tsconfig.json new file mode 100644 index 0000000000..eb09ea4f9c --- /dev/null +++ b/gulp-batch/tsconfig.json @@ -0,0 +1,22 @@ +{ + "files": [ + "index.d.ts", + "gulp-batch-tests.ts" + ], + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + } +} \ No newline at end of file diff --git a/gulp-batch/tslint.json b/gulp-batch/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/gulp-batch/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" }