1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | import { NextHandleFunction } from 'connect';
|
12 | import * as webpack from 'webpack';
|
13 |
|
14 | export = WebpackHotMiddleware;
|
15 |
|
16 | declare function WebpackHotMiddleware(
|
17 | compiler: webpack.ICompiler,
|
18 | options?: WebpackHotMiddleware.MiddlewareOptions
|
19 | ): NextHandleFunction & WebpackHotMiddleware.EventStream;
|
20 |
|
21 | declare namespace WebpackHotMiddleware {
|
22 | interface ClientOptions {
|
23 | path?: string | undefined;
|
24 | reload?: boolean | undefined;
|
25 | name?: string | undefined;
|
26 | timeout?: number | undefined;
|
27 | overlay?: boolean | undefined;
|
28 | noInfo?: boolean | undefined;
|
29 | quiet?: boolean | undefined;
|
30 | dynamicPublicPath?: boolean | undefined;
|
31 | autoConnect?: boolean | undefined;
|
32 | ansiColors?: {
|
33 | [key: string]: any
|
34 | } | undefined;
|
35 | overlayStyles?: {
|
36 | [key: string]: any
|
37 | } | undefined;
|
38 | overlayWarnings?: boolean | undefined;
|
39 | }
|
40 | interface MiddlewareOptions {
|
41 | log?: false | Logger | undefined;
|
42 | path?: string | undefined;
|
43 | heartbeat?: number | undefined;
|
44 | }
|
45 |
|
46 | type Logger = (message?: any, ...optionalParams: any[]) => void;
|
47 |
|
48 | interface EventStream {
|
49 | publish(payload: any): void;
|
50 | close(): void;
|
51 | }
|
52 | }
|