diff --git a/webpack-dev-server/webpack-dev-server.d.ts b/webpack-dev-server/webpack-dev-server.d.ts index 9abc2004eb..c58a44ff7f 100644 --- a/webpack-dev-server/webpack-dev-server.d.ts +++ b/webpack-dev-server/webpack-dev-server.d.ts @@ -29,7 +29,7 @@ declare module "webpack-dev-server" { watchOptions?: webpack.WatchOptions; publicPath: string; headers?: any; - stats?: webpack.compiler.StatsToJsonOptions | webpack.compiler.StatsToStringOptions; + stats?: webpack.compiler.StatsOptions| webpack.compiler.StatsToStringOptions; setup?(app: core.Express): void; } diff --git a/webpack/webpack.d.ts b/webpack/webpack.d.ts index 42dbc81e05..b53d44bfb8 100644 --- a/webpack/webpack.d.ts +++ b/webpack/webpack.d.ts @@ -63,6 +63,8 @@ declare module "webpack" { recordsOutputPath?: string; /** Add additional plugins to the compiler. */ plugins?: (Plugin|Function)[]; + /** Stats options for logging */ + stats?: compiler.StatsOptions; } interface Entry { @@ -482,12 +484,12 @@ declare module "webpack" { /** Returns true if there were warnings while compiling. */ hasWarnings(): boolean; /** Return information as json object */ - toJson(options?: StatsToJsonOptions): any; //TODO: type this + toJson(options?: StatsOptions): any; //TODO: type this /** Returns a formatted string of the result. */ toString(options?: StatsToStringOptions): string; } - interface StatsToJsonOptions { + interface StatsOptions { /** context directory for request shortening */ context?: boolean; /** add the hash of the compilation */ @@ -524,7 +526,7 @@ declare module "webpack" { assetsSort?: string; } - interface StatsToStringOptions extends StatsToJsonOptions { + interface StatsToStringOptions extends StatsOptions { /** With console colors */ colors?: boolean; }