Merge pull request #19885 from dudeofawesome/gulp-zip

Add typings for gulp-zip
This commit is contained in:
Benjamin Lichtman
2017-09-21 15:33:54 -07:00
committed by GitHub
4 changed files with 47 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
import * as GulpZip from 'gulp-zip';
GulpZip('file.zip').on('end', () => {});
GulpZip('file.zip', {compress: false}).on('end', () => {});

20
types/gulp-zip/index.d.ts vendored Normal file
View File

@@ -0,0 +1,20 @@
// Type definitions for gulp-zip 4.0
// Project: https://github.com/sindresorhus/gulp-zip
// Definitions by: Louis Orleans <https://github.com/dudeofawesome>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
declare namespace GulpZip {
interface GulpZipOptions {
/**
* Compress
* @default true
*/
compress?: boolean;
}
}
declare function GulpZip(filename: string, options?: GulpZip.GulpZipOptions): NodeJS.ReadStream;
export = GulpZip;

View File

@@ -0,0 +1,22 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"gulp-zip-tests.ts"
]
}

View File

@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }