diff --git a/types/friendly-errors-webpack-plugin/index.d.ts b/types/friendly-errors-webpack-plugin/index.d.ts index 7e2937c867..969b8065ac 100644 --- a/types/friendly-errors-webpack-plugin/index.d.ts +++ b/types/friendly-errors-webpack-plugin/index.d.ts @@ -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; + } }