From fe47fd39e0e5b679954fb9fa9063ce5f08c49522 Mon Sep 17 00:00:00 2001
From: Peter Juras
Date: Sat, 23 Jan 2016 23:19:15 +0100
Subject: [PATCH] Add type definitions for gulp-install
---
gulp-install/gulp-install-tests.ts | 25 +++++++++++++++++++++++++
gulp-install/gulp-install.d.ts | 22 ++++++++++++++++++++++
2 files changed, 47 insertions(+)
create mode 100644 gulp-install/gulp-install-tests.ts
create mode 100644 gulp-install/gulp-install.d.ts
diff --git a/gulp-install/gulp-install-tests.ts b/gulp-install/gulp-install-tests.ts
new file mode 100644
index 0000000000..0b9b5da0c2
--- /dev/null
+++ b/gulp-install/gulp-install-tests.ts
@@ -0,0 +1,25 @@
+///
+///
+
+import * as gulp from 'gulp';
+import * as install from 'gulp-install';
+
+// Examples taken from https://www.npmjs.com/package/gulp-install
+
+// Usage in a gulp stream
+gulp.src('src')
+ .pipe(install());
+
+// Options
+install({
+ production: true,
+ ignoreScripts: true,
+ noOptional: true,
+ allowRoot: true,
+ args: ['one', 'two', 'three']
+});
+
+// Options: args only as a string
+install({
+ args: 'one'
+});
\ No newline at end of file
diff --git a/gulp-install/gulp-install.d.ts b/gulp-install/gulp-install.d.ts
new file mode 100644
index 0000000000..3d332548ca
--- /dev/null
+++ b/gulp-install/gulp-install.d.ts
@@ -0,0 +1,22 @@
+// Type definitions for gulp-install v0.6.0
+// Project: https://www.npmjs.com/package/gulp-install
+// Definitions by: Peter Juras
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+///
+
+declare module "gulp-install" {
+ interface Options {
+ production?: boolean;
+ ignoreScripts?: boolean;
+ noOptional?: boolean;
+ allowRoot?: boolean;
+ args?: string | string[];
+ }
+
+ interface Install {
+ (options?: Options) : NodeJS.ReadWriteStream;
+ }
+
+ const install : Install;
+ export = install;
+}