mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-04 17:20:09 +00:00
fix: change Compiler to ICompiler
- Updates the WebpackDevMiddleware function to accept MultiCompilers - Updates deprecated names Closes #17608
This commit is contained in:
14
types/webpack-dev-middleware/index.d.ts
vendored
14
types/webpack-dev-middleware/index.d.ts
vendored
@@ -4,12 +4,12 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import { NextHandleFunction } from 'connect';
|
||||
import { compiler } from 'webpack';
|
||||
import * as webpack from 'webpack';
|
||||
|
||||
export = WebpackDevMiddleware;
|
||||
|
||||
declare function WebpackDevMiddleware(
|
||||
compiler: compiler.Compiler,
|
||||
compiler: webpack.ICompiler,
|
||||
options?: WebpackDevMiddleware.Options
|
||||
): WebpackDevMiddleware.WebpackDevMiddleware & NextHandleFunction;
|
||||
|
||||
@@ -18,13 +18,13 @@ declare namespace WebpackDevMiddleware {
|
||||
noInfo?: boolean;
|
||||
quiet?: boolean;
|
||||
lazy?: boolean;
|
||||
watchOptions?: compiler.WatchOptions;
|
||||
watchOptions?: webpack.WatchOptions;
|
||||
publicPath: string;
|
||||
index?: string;
|
||||
headers?: {
|
||||
[name: string]: string;
|
||||
};
|
||||
stats?: compiler.StatsToStringOptions;
|
||||
stats?: webpack.Stats.ToStringOptions;
|
||||
reporter?: Reporter | null;
|
||||
serverSideRender?: boolean;
|
||||
|
||||
@@ -36,7 +36,7 @@ declare namespace WebpackDevMiddleware {
|
||||
|
||||
interface ReporterOptions {
|
||||
state: boolean;
|
||||
stats: compiler.Stats;
|
||||
stats: webpack.Stats;
|
||||
options: Options;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ declare namespace WebpackDevMiddleware {
|
||||
|
||||
interface WebpackDevMiddleware {
|
||||
close(callback?: () => void): void;
|
||||
invalidate(callback?: (stats: compiler.Stats) => void): void;
|
||||
waitUntilValid(callback?: (stats: compiler.Stats) => void): void;
|
||||
invalidate(callback?: (stats: webpack.Stats) => void): void;
|
||||
waitUntilValid(callback?: (stats: webpack.Stats) => void): void;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user