npm.io
2.0.6 • Published 2 years ago

@types/webpack-blocks__uglify

Licence
MIT
Version
2.0.6
Deps
2
Size
6 kB
Vulns
0
Weekly
0
Stars
51.4K

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.