UNPKG

2.05 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
11// Type definitions for friendly-errors-webpack-plugin 0.1
12// Project: https://github.com/geowarin/friendly-errors-webpack-plugin
13// Definitions by: Arne Bahlo <https://github.com/bahlo>
14// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
15// TypeScript Version: 3.7
16
17import { Compiler, Plugin } from "webpack";
18
19export = FriendlyErrorsWebpackPlugin;
20
21declare class FriendlyErrorsWebpackPlugin extends Plugin {
22 constructor(options?: FriendlyErrorsWebpackPlugin.Options);
23
24 apply(compiler: Compiler): void;
25}
26
27declare namespace FriendlyErrorsWebpackPlugin {
28 enum Severity {
29 Error = "error",
30 Warning = "warning",
31 }
32
33 interface Options {
34 compilationSuccessInfo?: {
35 messages: string[];
36 notes: string[];
37 } | undefined;
38 onErrors?(severity: Severity, errors: string): void;
39 clearConsole?: boolean | undefined;
40 additionalFormatters?: Array<(errors: WebpackError[], type: Severity) => string[]> | undefined;
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: Thu, 14 Sep 2023 15:26:41 GMT
58 * Dependencies: [@types/webpack](https://npmjs.com/package/@types/webpack)
59 * Global values: none
60
61# Credits
62These definitions were written by [Arne Bahlo](https://github.com/bahlo).
63
\No newline at end of file