mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-31 11:40:47 +08:00
Add Options interface to the namespace
This commit is contained in:
@@ -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
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user