Nobody Pays (for) Magazines

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

    0.1.2 • Public • Published

    Installation

    npm install --save @types/webpack-deadcode-plugin

    Summary

    This package contains type definitions for webpack-deadcode-plugin (https://github.com/MQuy/webpack-deadcode-plugin#readme).

    Details

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

    index.d.ts

    // Type definitions for webpack-deadcode-plugin 0.1
    // Project: https://github.com/MQuy/webpack-deadcode-plugin#readme
    // Definitions by: Ciarán Ingle <https://github.com/inglec-arista>
    // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
    // TypeScript Version: 3.7
    
    import { compilation, Plugin } from 'webpack';
    
    interface Options {
        /** Current working directoy for patterns above. If you don't set explicitly, your webpack context will be used. */
        context?: string | undefined;
        /** Whether to run unsed export detection or not. */
        detectUnusedExport?: boolean | undefined;
        /** Whether to run unused files detection or not. */
        detectUnusedFiles?: boolean | undefined;
        /** The array of patterns to not look at. */
        exclude?: string[] | undefined;
        /**
         * Deadcode does not interrupt the compilation by default.
         * If you want to cancel the compilation, set it `true`, it throws a fatal error and stops the compilation.
         */
        failOnHint?: boolean | undefined;
        outputFile?: string | undefined;
        /**
         * The array of patterns to look for unused files and unused export in used files.
         * Directly passed to [`fast-glob`](https://github.com/mrmlnc/fast-glob).
         */
        patterns?: string[] | undefined;
    }
    
    declare class WebpackDeadcodePlugin extends Plugin {
        options: Options;
    
        constructor(options?: Options);
    
        handleAfterEmit(options: Required<Options>, compilation: compilation.Compilation, callback: () => void): void;
    }
    
    export = WebpackDeadcodePlugin;

    Additional Details

    • Last updated: Fri, 02 Jul 2021 18:05:26 GMT
    • Dependencies: @types/webpack
    • Global values: none

    Credits

    These definitions were written by Ciarán Ingle.

    Keywords

    none

    Install

    npm i @types/webpack-deadcode-plugin

    DownloadsWeekly Downloads

    701

    Version

    0.1.2

    License

    MIT

    Unpacked Size

    5.88 kB

    Total Files

    4

    Last publish

    Collaborators

    • types