mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-04 01:00:05 +00:00
updated definition (#36833)
This commit is contained in:
committed by
Andrew Branch
parent
c2b4069bc7
commit
b5ffdec0f5
50
types/friendly-errors-webpack-plugin/index.d.ts
vendored
50
types/friendly-errors-webpack-plugin/index.d.ts
vendored
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user