npm.io
1.7.0 • Published 1 year ago

@types/friendly-errors-webpack-plugin

Licence
MIT
Version
1.7.0
Deps
1
Size
5 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/friendly-errors-webpack-plugin

Summary

This package contains type definitions for friendly-errors-webpack-plugin (https://github.com/geowarin/friendly-errors-webpack-plugin).

Details

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

index.d.ts

import { Plugin } from "webpack";

export = FriendlyErrorsWebpackPlugin;

declare class FriendlyErrorsWebpackPlugin extends Plugin {
    constructor(options?: FriendlyErrorsWebpackPlugin.Options);
}

declare namespace FriendlyErrorsWebpackPlugin {
    type Severity = "error" | "warning";

    interface Options {
        compilationSuccessInfo?: {
            messages: string[];
            notes: string[];
        } | undefined;

        /**
         * You can listen to errors transformed and prioritized by the plugin.
         */
        onErrors?(severity: Severity, errors: WebpackError[]): void;

        /**
         * Whether the console should be cleared between each compilation.
         * @default true
         */
        clearConsole?: boolean | undefined;

        additionalFormatters?: Array<(errors: WebpackError[], type: Severity) => string[]> | undefined;

        additionalTransformers?: Array<(error: any) => any> | undefined;
    }

    interface WebpackError {
        message: string;
        file: string;
        origin: string;
        name: string;
        severity: Severity;
        webpackError: any;
    }
}

Additional Details

  • Last updated: Fri, 01 Nov 2024 1634 GMT
  • Dependencies: @types/webpack

Credits

These definitions were written by Arne Bahlo.