mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-02 19:43:20 +08:00
Add types for gulp-clean-dest@0.2
This commit is contained in:
10
types/gulp-clean-dest/gulp-clean-dest-tests.ts
Normal file
10
types/gulp-clean-dest/gulp-clean-dest-tests.ts
Normal file
@@ -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
types/gulp-clean-dest/index.d.ts
vendored
Normal file
29
types/gulp-clean-dest/index.d.ts
vendored
Normal 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
types/gulp-clean-dest/tsconfig.json
Normal file
23
types/gulp-clean-dest/tsconfig.json
Normal 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
types/gulp-clean-dest/tslint.json
Normal file
1
types/gulp-clean-dest/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user