@types/webpack-blocks__uglify
TypeScript icon, indicating that this package has built-in type declarations

2.0.6 • Public • Published

Installation

npm install --save @types/webpack-blocks__uglify

Summary

This package contains type definitions for @webpack-blocks/uglify (https://github.com/andywer/webpack-blocks/tree/master/packages/uglify).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/webpack-blocks__uglify.

index.d.ts

import { MinifyOptions } from "uglify-js";
import { Block } from "webpack-blocks";

declare namespace uglify {
    type TestType = string | RegExp;
    type ExtractCommentsFunction = (node: any, comment: any) => boolean | ExtractCommentsObject;
    type FileNameFunction = (file: string) => string;

    interface ExtractCommentsObject {
        condition?: boolean | string | RegExp | ExtractCommentsFunction | undefined;
        filename?: RegExp | FileNameFunction | undefined;
        banner?: boolean | string | FileNameFunction | undefined;
    }

    interface Options {
        test?: TestType | TestType[] | undefined;
        include?: TestType | TestType[] | undefined;
        exclude?: TestType | TestType[] | undefined;
        chunkFilter?: ((chunk: any) => boolean) | undefined;
        cache?: string | boolean | undefined;
        cacheKeys?: ((defaultCacheKeys: any, file: any) => object) | undefined;
        parallel?: boolean | number | undefined;
        sourceMap?: boolean | undefined;
        minify?:
            | ((
                file: any,
                sourceMap: any,
            ) => { error: any; map: any; code: any; warnings: any; extractedComments: any })
            | undefined;
        uglifyOptions?: MinifyOptions | undefined;
        extractComments?: boolean | string | RegExp | ExtractCommentsFunction | undefined;
        warningsFilter?: ((warning: any, source: any) => boolean) | undefined;
    }
}

declare function uglify(options?: uglify.Options): Block;

export = uglify;

Additional Details

Credits

These definitions were written by Max Boguslavskiy.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/webpack-blocks__uglify

Weekly Downloads

4

Version

2.0.6

License

MIT

Unpacked Size

5.94 kB

Total Files

5

Last publish

Collaborators

  • types