diff --git a/types/gulp-pug/gulp-pug-tests.ts b/types/gulp-pug/gulp-pug-tests.ts new file mode 100644 index 0000000000..1820c2c375 --- /dev/null +++ b/types/gulp-pug/gulp-pug-tests.ts @@ -0,0 +1,8 @@ +import { src, dest } from 'gulp'; +import * as gulpPug from 'gulp-pug'; + +let s1 = gulpPug(); +let s2 = gulpPug({}); +let s3 = gulpPug({ basedir: '.' }); + +src('fixtures.js').pipe(s1).pipe(s2).pipe(s3); diff --git a/types/gulp-pug/index.d.ts b/types/gulp-pug/index.d.ts new file mode 100644 index 0000000000..46a8a79239 --- /dev/null +++ b/types/gulp-pug/index.d.ts @@ -0,0 +1,24 @@ +// Type definitions for gulp-pug 3.3 +// Project: https://github.com/pugjs/gulp-pug#readme +// Definitions by: remisery +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import stream = require('stream'); + +import { Options } from 'pug'; + +declare function GulpPug(params?: GulpPug.Params): stream.Transform; + +declare namespace GulpPug { + interface Params extends Options { + locals?: any; + data?: any; + client?: boolean; + pug?: any; + verbose?: boolean; + } +} + +export = GulpPug; diff --git a/types/gulp-pug/tsconfig.json b/types/gulp-pug/tsconfig.json new file mode 100644 index 0000000000..58c3140198 --- /dev/null +++ b/types/gulp-pug/tsconfig.json @@ -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-pug-tests.ts" + ] +} diff --git a/types/gulp-pug/tslint.json b/types/gulp-pug/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/gulp-pug/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +}