From 2961bf02f1ac6eb8b0341664a01f484f25a4fef1 Mon Sep 17 00:00:00 2001 From: Tanguy Krotoff Date: Wed, 6 Jan 2016 16:22:15 +0100 Subject: [PATCH] Add Options interface to the namespace --- gulp-minify-html/gulp-minify-html-tests.ts | 2 +- gulp-minify-html/gulp-minify-html.d.ts | 36 +++++++++++----------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/gulp-minify-html/gulp-minify-html-tests.ts b/gulp-minify-html/gulp-minify-html-tests.ts index 2ec41e556..556ee203b 100644 --- a/gulp-minify-html/gulp-minify-html-tests.ts +++ b/gulp-minify-html/gulp-minify-html-tests.ts @@ -8,7 +8,7 @@ minifyHtml(); minifyHtml({conditionals: true, loose: true}); gulp.task('minify-html', () => { - var opts = { + var opts: minifyHtml.Options = { conditionals: true, spare: true }; diff --git a/gulp-minify-html/gulp-minify-html.d.ts b/gulp-minify-html/gulp-minify-html.d.ts index 11ce298a4..321a56925 100644 --- a/gulp-minify-html/gulp-minify-html.d.ts +++ b/gulp-minify-html/gulp-minify-html.d.ts @@ -6,32 +6,32 @@ /// declare module 'gulp-minify-html' { - interface IOptions { - // Do not remove empty attributes - empty?: boolean; + namespace minifyHtml { + interface Options { + // Do not remove empty attributes + empty?: boolean; - // Do not strip CDATA from scripts - cdata?: boolean; + // Do not strip CDATA from scripts + cdata?: boolean; - // Do not remove comments - comments?: boolean; + // Do not remove comments + comments?: boolean; - // Do not remove conditional internet explorer comments - conditionals?: boolean; + // Do not remove conditional internet explorer comments + conditionals?: boolean; - // Do not remove redundant attributes - spare?: boolean; + // Do not remove redundant attributes + spare?: boolean; - // Do not remove arbitrary quotes - quotes?: boolean; + // Do not remove arbitrary quotes + quotes?: boolean; - // Preserve one whitespace - loose?: boolean; + // Preserve one whitespace + loose?: boolean; + } } - function minifyHtml(options?: IOptions): NodeJS.ReadWriteStream; - - namespace minifyHtml {} + function minifyHtml(options?: minifyHtml.Options): NodeJS.ReadWriteStream; export = minifyHtml; }