UNPKG

1.9 kBMarkdownView Raw
1# Installation
2> `npm install --save @types/friendly-errors-webpack-plugin`
3
4# Summary
5This package contains type definitions for friendly-errors-webpack-plugin (https://github.com/geowarin/friendly-errors-webpack-plugin).
6
7# Details
8Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/friendly-errors-webpack-plugin.
9## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/friendly-errors-webpack-plugin/index.d.ts)
10````ts
11import { Plugin } from "webpack";
12
13export = FriendlyErrorsWebpackPlugin;
14
15declare class FriendlyErrorsWebpackPlugin extends Plugin {
16 constructor(options?: FriendlyErrorsWebpackPlugin.Options);
17}
18
19declare namespace FriendlyErrorsWebpackPlugin {
20 type Severity = "error" | "warning";
21
22 interface Options {
23 compilationSuccessInfo?: {
24 messages: string[];
25 notes: string[];
26 } | undefined;
27
28 /**
29 * You can listen to errors transformed and prioritized by the plugin.
30 */
31 onErrors?(severity: Severity, errors: WebpackError[]): void;
32
33 /**
34 * Whether the console should be cleared between each compilation.
35 * @default true
36 */
37 clearConsole?: boolean | undefined;
38
39 additionalFormatters?: Array<(errors: WebpackError[], type: Severity) => string[]> | undefined;
40
41 additionalTransformers?: Array<(error: any) => any> | undefined;
42 }
43
44 interface WebpackError {
45 message: string;
46 file: string;
47 origin: string;
48 name: string;
49 severity: Severity;
50 webpackError: any;
51 }
52}
53
54````
55
56### Additional Details
57 * Last updated: Fri, 01 Nov 2024 16:36:34 GMT
58 * Dependencies: [@types/webpack](https://npmjs.com/package/@types/webpack)
59
60# Credits
61These definitions were written by [Arne Bahlo](https://github.com/bahlo).
62
\No newline at end of file