1 | import { Compiler, Plugin } from "webpack";
|
2 |
|
3 | export = FriendlyErrorsWebpackPlugin;
|
4 |
|
5 | declare class FriendlyErrorsWebpackPlugin extends Plugin {
|
6 | constructor(options?: FriendlyErrorsWebpackPlugin.Options);
|
7 |
|
8 | apply(compiler: Compiler): void;
|
9 | }
|
10 |
|
11 | declare namespace FriendlyErrorsWebpackPlugin {
|
12 | enum Severity {
|
13 | Error = "error",
|
14 | Warning = "warning",
|
15 | }
|
16 |
|
17 | interface Options {
|
18 | compilationSuccessInfo?: {
|
19 | messages: string[];
|
20 | notes: string[];
|
21 | } | undefined;
|
22 | onErrors?(severity: Severity, errors: string): void;
|
23 | clearConsole?: boolean | undefined;
|
24 | additionalFormatters?: Array<(errors: WebpackError[], type: Severity) => string[]> | undefined;
|
25 | additionalTransformers?: Array<(error: any) => any> | undefined;
|
26 | }
|
27 |
|
28 | interface WebpackError {
|
29 | message: string;
|
30 | file: string;
|
31 | origin: string;
|
32 | name: string;
|
33 | severity: Severity;
|
34 | webpackError: any;
|
35 | }
|
36 | }
|