From b81ce46d6afffa83d14fa265e2eb91524fb72c31 Mon Sep 17 00:00:00 2001 From: remisery <20260860+remisery@users.noreply.github.com> Date: Thu, 3 Aug 2017 00:21:26 +0200 Subject: [PATCH] [gulp-pug] Introduce new typings (#18575) * Introduce gulp-pug * fix revision comments --- types/gulp-pug/gulp-pug-tests.ts | 8 ++++++++ types/gulp-pug/index.d.ts | 24 ++++++++++++++++++++++++ types/gulp-pug/tsconfig.json | 22 ++++++++++++++++++++++ types/gulp-pug/tslint.json | 3 +++ 4 files changed, 57 insertions(+) create mode 100644 types/gulp-pug/gulp-pug-tests.ts create mode 100644 types/gulp-pug/index.d.ts create mode 100644 types/gulp-pug/tsconfig.json create mode 100644 types/gulp-pug/tslint.json 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" +}