updated definition (#36833)

This commit is contained in:
Max Boguslavsky
2019-07-16 21:53:26 +03:00
committed by Andrew Branch
parent c2b4069bc7
commit b5ffdec0f5

View File

@@ -4,37 +4,39 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.4
import { Plugin } from 'webpack';
import { Plugin, Compiler } from 'webpack';
export = FriendlyErrorsWebpackPlugin;
declare class FriendlyErrorsWebpackPlugin extends Plugin {
constructor(options?: FriendlyErrorsWebpackPlugin.Options);
constructor(options?: FriendlyErrorsWebpackPlugin.Options);
apply(compiler: Compiler): void;
}
declare namespace FriendlyErrorsWebpackPlugin {
enum Severity {
Error = "error",
Warning = "warning",
}
enum Severity {
Error = "error",
Warning = "warning",
}
interface Options {
compilationSuccessInfo?: {
messages: string[],
notes: string[],
};
onErrors?(severity: Severity, errors: string): void;
clearConsole?: boolean;
additionalFormatters?: Array<(errors: WebpackError[], type: Severity) => string[]>;
additionalTransformers?: Array<(error: any) => any>;
}
interface Options {
compilationSuccessInfo?: {
messages: string[],
notes: string[],
};
onErrors?(severity: Severity, errors: string): void;
clearConsole?: boolean;
additionalFormatters?: Array<(errors: WebpackError[], type: Severity) => string[]>;
additionalTransformers?: Array<(error: any) => any>;
}
interface WebpackError {
message: string;
file: string;
origin: string;
name: string;
severity: Severity;
webpackError: any;
}
interface WebpackError {
message: string;
file: string;
origin: string;
name: string;
severity: Severity;
webpackError: any;
}
}