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