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