1 | # Installation
|
2 | > `npm install --save @types/friendly-errors-webpack-plugin`
|
3 |
|
4 | # Summary
|
5 | This package contains type definitions for friendly-errors-webpack-plugin (https://github.com/geowarin/friendly-errors-webpack-plugin).
|
6 |
|
7 | # Details
|
8 | Files 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
|
11 | import { Plugin } from "webpack";
|
12 |
|
13 | export = FriendlyErrorsWebpackPlugin;
|
14 |
|
15 | declare class FriendlyErrorsWebpackPlugin extends Plugin {
|
16 | constructor(options?: FriendlyErrorsWebpackPlugin.Options);
|
17 | }
|
18 |
|
19 | declare 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
|
61 | These definitions were written by [Arne Bahlo](https://github.com/bahlo).
|
62 |
|
\ | No newline at end of file |