DefinitelyTyped/types/gulp-uglify/index.d.ts
Liam McLoughlin dfd2e2fcc2 Allow specific mangle options to be passed to gulp-uglify, fix incorrectly narrow type in uglify-js (#28085)
* Allow specific mangle options to be passed to gulp-uglify

* Set required TS version

* Update uglify-js v2 too

* Fix tests
2018-10-15 09:58:40 -07:00

34 lines
1.0 KiB
TypeScript

// Type definitions for gulp-uglify 3.0
// Project: https://github.com/terinjokes/gulp-uglify
// Definitions by: Christopher Haws <https://github.com/ChristopherHaws>
// Leonard Thieu <https://github.com/leonard-thieu>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
/// <reference types="node"/>
import * as UglifyJS from 'uglify-js';
declare namespace GulpUglify {
interface Options {
/**
* Pass false to skip mangling names.
*/
mangle?: UglifyJS.MangleOptions | boolean;
/**
* Pass if you wish to specify additional output options. The defaults are optimized for best compression.
*/
output?: UglifyJS.OutputOptions;
/**
* Pass an object to specify custom compressor options. Pass false to skip compression completely.
*/
compress?: UglifyJS.CompressOptions | boolean;
}
}
declare function GulpUglify(options?: GulpUglify.Options): NodeJS.ReadWriteStream;
export = GulpUglify;