mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Types for gulp-tap (#31917)
* Types for "gulp-tap" added * Types for "gulp-tap" added * Requested changes applied * Requested changes applied
This commit is contained in:
parent
79108a1ef2
commit
239748d8be
11
types/gulp-tap/gulp-tap-tests.ts
Normal file
11
types/gulp-tap/gulp-tap-tests.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import gulpTap = require('gulp-tap');
|
||||
import gulp = require('gulp');
|
||||
import Vinyl = require('vinyl');
|
||||
|
||||
gulp.task('testTask', () => {
|
||||
return gulp.src(['src/*.html'])
|
||||
.pipe(gulpTap((sourceFile: Vinyl) => {
|
||||
console.log(sourceFile.path);
|
||||
}))
|
||||
.pipe(gulp.dest('dist/'));
|
||||
});
|
||||
22
types/gulp-tap/index.d.ts
vendored
Normal file
22
types/gulp-tap/index.d.ts
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
// Type definitions for gulp-tap 1.0
|
||||
// Project: https://github.com/geejs/gulp-tap
|
||||
// Definitions by: Takesi Tokugawa <https://github.com/TokugawaTakesi>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
import Vinyl = require('vinyl');
|
||||
|
||||
declare namespace tap {
|
||||
interface Tap {
|
||||
(tapFunction: TapFunction, t?: any): NodeJS.ReadWriteStream;
|
||||
}
|
||||
|
||||
interface TapFunction {
|
||||
(file: Vinyl): any;
|
||||
}
|
||||
}
|
||||
|
||||
declare function tap(tapFunction: (file: Vinyl, t?: {}) => void): NodeJS.ReadWriteStream;
|
||||
|
||||
export = tap;
|
||||
23
types/gulp-tap/tsconfig.json
Normal file
23
types/gulp-tap/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"gulp-tap-tests.ts"
|
||||
]
|
||||
}
|
||||
3
types/gulp-tap/tslint.json
Normal file
3
types/gulp-tap/tslint.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user