Merge pull request #21429 from andypyrope/al-gulp-clean-dest

Add types for gulp-clean-dest@0.2
This commit is contained in:
Daniel Rosenwasser
2017-11-11 00:51:41 -08:00
committed by GitHub
4 changed files with 63 additions and 0 deletions
@@ -0,0 +1,10 @@
import cleanDest = require("gulp-clean-dest");
const someDir = ".";
// $ExpectType ReadWriteStream
cleanDest(someDir);
cleanDest(someDir, {});
cleanDest(someDir, { cwd: someDir });
cleanDest(someDir, { extension: ".ts" });
cleanDest(someDir, { cwd: someDir, extension: ".ts" });
+29
View File
@@ -0,0 +1,29 @@
// Type definitions for gulp-clean-dest 0.2
// Project: https://github.com/clark800/gulp-clean-dest
// Definitions by: Andrey Lalev <https://github.com/andypyrope>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
declare namespace gulpCleanDest {
interface Options {
/**
* The working directory the folder is relative to.
*/
cwd?: string;
/**
* Extension of the destination files. Useful if it differs from the original.
*/
extension?: string;
}
}
/**
* Removes files from the dest directory prior to building.
* @param destination The name of the dest directory
* @param options Options for the cleaning process
*/
declare function gulpCleanDest(destination: string, options?: gulpCleanDest.Options): NodeJS.ReadWriteStream;
export = gulpCleanDest;
+23
View File
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"gulp-clean-dest-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }