Add Options interface to the namespace

This commit is contained in:
Tanguy Krotoff
2016-01-06 16:22:15 +01:00
parent f11e49cfb7
commit 2961bf02f1
2 changed files with 19 additions and 19 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ minifyHtml();
minifyHtml({conditionals: true, loose: true});
gulp.task('minify-html', () => {
var opts = {
var opts: minifyHtml.Options = {
conditionals: true,
spare: true
};
+18 -18
View File
@@ -6,32 +6,32 @@
/// <reference path="../node/node.d.ts" />
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;
}