webpack-dev-server 4.8.0 → 4.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,7 +26,6 @@ declare class Server {
26
26
  /** @typedef {import("express").NextFunction} NextFunction */
27
27
  /** @typedef {import("express").RequestHandler} ExpressRequestHandler */
28
28
  /** @typedef {import("express").ErrorRequestHandler} ExpressErrorRequestHandler */
29
- /** @typedef {import("anymatch").Matcher} AnymatchMatcher */
30
29
  /** @typedef {import("chokidar").WatchOptions} WatchOptions */
31
30
  /** @typedef {import("chokidar").FSWatcher} FSWatcher */
32
31
  /** @typedef {import("connect-history-api-fallback").Options} ConnectHistoryApiFallbackOptions */
@@ -60,7 +59,7 @@ declare class Server {
60
59
  /**
61
60
  * @typedef {Object} WatchFiles
62
61
  * @property {string | string[]} paths
63
- * @property {WatchOptions & { aggregateTimeout?: number, ignored?: AnymatchMatcher | string[], poll?: number | boolean }} [options]
62
+ * @property {WatchOptions & { aggregateTimeout?: number, ignored?: WatchOptions["ignored"], poll?: number | boolean }} [options]
64
63
  */
65
64
  /**
66
65
  * @typedef {Object} Static
@@ -68,7 +67,7 @@ declare class Server {
68
67
  * @property {string | string[]} [publicPath]
69
68
  * @property {boolean | ServeIndexOptions} [serveIndex]
70
69
  * @property {ServeStaticOptions} [staticOptions]
71
- * @property {boolean | WatchOptions & { aggregateTimeout?: number, ignored?: AnymatchMatcher | string[], poll?: number | boolean }} [watch]
70
+ * @property {boolean | WatchOptions & { aggregateTimeout?: number, ignored?: WatchOptions["ignored"], poll?: number | boolean }} [watch]
72
71
  */
73
72
  /**
74
73
  * @typedef {Object} NormalizedStatic
@@ -221,6 +220,144 @@ declare class Server {
221
220
  simpleType: string;
222
221
  };
223
222
  "client-logging": {
223
+ /**
224
+ * @template Request, Response
225
+ * @typedef {import("webpack-dev-middleware").Options<Request, Response>} DevMiddlewareOptions
226
+ */
227
+ /**
228
+ * @template Request, Response
229
+ * @typedef {import("webpack-dev-middleware").Context<Request, Response>} DevMiddlewareContext
230
+ */
231
+ /**
232
+ * @typedef {"local-ip" | "local-ipv4" | "local-ipv6" | string} Host
233
+ */
234
+ /**
235
+ * @typedef {number | string | "auto"} Port
236
+ */
237
+ /**
238
+ * @typedef {Object} WatchFiles
239
+ * @property {string | string[]} paths
240
+ * @property {WatchOptions & { aggregateTimeout?: number, ignored?: WatchOptions["ignored"], poll?: number | boolean }} [options]
241
+ */
242
+ /**
243
+ * @typedef {Object} Static
244
+ * @property {string} [directory]
245
+ * @property {string | string[]} [publicPath]
246
+ * @property {boolean | ServeIndexOptions} [serveIndex]
247
+ * @property {ServeStaticOptions} [staticOptions]
248
+ * @property {boolean | WatchOptions & { aggregateTimeout?: number, ignored?: WatchOptions["ignored"], poll?: number | boolean }} [watch]
249
+ */
250
+ /**
251
+ * @typedef {Object} NormalizedStatic
252
+ * @property {string} directory
253
+ * @property {string[]} publicPath
254
+ * @property {false | ServeIndexOptions} serveIndex
255
+ * @property {ServeStaticOptions} staticOptions
256
+ * @property {false | WatchOptions} watch
257
+ */
258
+ /**
259
+ * @typedef {Object} ServerConfiguration
260
+ * @property {"http" | "https" | "spdy" | string} [type]
261
+ * @property {ServerOptions} [options]
262
+ */
263
+ /**
264
+ * @typedef {Object} WebSocketServerConfiguration
265
+ * @property {"sockjs" | "ws" | string | Function} [type]
266
+ * @property {Record<string, any>} [options]
267
+ */
268
+ /**
269
+ * @typedef {(import("ws").WebSocket | import("sockjs").Connection & { send: import("ws").WebSocket["send"], terminate: import("ws").WebSocket["terminate"], ping: import("ws").WebSocket["ping"] }) & { isAlive?: boolean }} ClientConnection
270
+ */
271
+ /**
272
+ * @typedef {import("ws").WebSocketServer | import("sockjs").Server & { close: import("ws").WebSocketServer["close"] }} WebSocketServer
273
+ */
274
+ /**
275
+ * @typedef {{ implementation: WebSocketServer, clients: ClientConnection[] }} WebSocketServerImplementation
276
+ */
277
+ /**
278
+ * @callback ByPass
279
+ * @param {Request} req
280
+ * @param {Response} res
281
+ * @param {ProxyConfigArrayItem} proxyConfig
282
+ */
283
+ /**
284
+ * @typedef {{ path?: HttpProxyMiddlewareOptionsFilter | undefined, context?: HttpProxyMiddlewareOptionsFilter | undefined } & { bypass?: ByPass } & HttpProxyMiddlewareOptions } ProxyConfigArrayItem
285
+ */
286
+ /**
287
+ * @typedef {(ProxyConfigArrayItem | ((req?: Request | undefined, res?: Response | undefined, next?: NextFunction | undefined) => ProxyConfigArrayItem))[]} ProxyConfigArray
288
+ */
289
+ /**
290
+ * @typedef {{ [url: string]: string | ProxyConfigArrayItem }} ProxyConfigMap
291
+ */
292
+ /**
293
+ * @typedef {Object} OpenApp
294
+ * @property {string} [name]
295
+ * @property {string[]} [arguments]
296
+ */
297
+ /**
298
+ * @typedef {Object} Open
299
+ * @property {string | string[] | OpenApp} [app]
300
+ * @property {string | string[]} [target]
301
+ */
302
+ /**
303
+ * @typedef {Object} NormalizedOpen
304
+ * @property {string} target
305
+ * @property {import("open").Options} options
306
+ */
307
+ /**
308
+ * @typedef {Object} WebSocketURL
309
+ * @property {string} [hostname]
310
+ * @property {string} [password]
311
+ * @property {string} [pathname]
312
+ * @property {number | string} [port]
313
+ * @property {string} [protocol]
314
+ * @property {string} [username]
315
+ */
316
+ /**
317
+ * @typedef {Object} ClientConfiguration
318
+ * @property {"log" | "info" | "warn" | "error" | "none" | "verbose"} [logging]
319
+ * @property {boolean | { warnings?: boolean, errors?: boolean }} [overlay]
320
+ * @property {boolean} [progress]
321
+ * @property {boolean | number} [reconnect]
322
+ * @property {"ws" | "sockjs" | string} [webSocketTransport]
323
+ * @property {string | WebSocketURL} [webSocketURL]
324
+ */
325
+ /**
326
+ * @typedef {Array<{ key: string; value: string }> | Record<string, string | string[]>} Headers
327
+ */
328
+ /**
329
+ * @typedef {{ name?: string, path?: string, middleware: ExpressRequestHandler | ExpressErrorRequestHandler } | ExpressRequestHandler | ExpressErrorRequestHandler} Middleware
330
+ */
331
+ /**
332
+ * @typedef {Object} Configuration
333
+ * @property {boolean | string} [ipc]
334
+ * @property {Host} [host]
335
+ * @property {Port} [port]
336
+ * @property {boolean | "only"} [hot]
337
+ * @property {boolean} [liveReload]
338
+ * @property {DevMiddlewareOptions<Request, Response>} [devMiddleware]
339
+ * @property {boolean} [compress]
340
+ * @property {boolean} [magicHtml]
341
+ * @property {"auto" | "all" | string | string[]} [allowedHosts]
342
+ * @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
343
+ * @property {boolean} [setupExitSignals]
344
+ * @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
345
+ * @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
346
+ * @property {boolean | string | Static | Array<string | Static>} [static]
347
+ * @property {boolean | ServerOptions} [https]
348
+ * @property {boolean} [http2]
349
+ * @property {"http" | "https" | "spdy" | string | ServerConfiguration} [server]
350
+ * @property {boolean | "sockjs" | "ws" | string | WebSocketServerConfiguration} [webSocketServer]
351
+ * @property {ProxyConfigMap | ProxyConfigArrayItem | ProxyConfigArray} [proxy]
352
+ * @property {boolean | string | Open | Array<string | Open>} [open]
353
+ * @property {boolean} [setupExitSignals]
354
+ * @property {boolean | ClientConfiguration} [client]
355
+ * @property {Headers | ((req: Request, res: Response, context: DevMiddlewareContext<Request, Response>) => Headers)} [headers]
356
+ * @property {(devServer: Server) => void} [onAfterSetupMiddleware]
357
+ * @property {(devServer: Server) => void} [onBeforeSetupMiddleware]
358
+ * @property {(devServer: Server) => void} [onListening]
359
+ * @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
360
+ */
224
361
  configs: {
225
362
  type: string;
226
363
  values: string[];
@@ -234,133 +371,6 @@ declare class Server {
234
371
  };
235
372
  "client-overlay": {
236
373
  configs: {
237
- /**
238
- * @typedef {number | string | "auto"} Port
239
- */
240
- /**
241
- * @typedef {Object} WatchFiles
242
- * @property {string | string[]} paths
243
- * @property {WatchOptions & { aggregateTimeout?: number, ignored?: AnymatchMatcher | string[], poll?: number | boolean }} [options]
244
- */
245
- /**
246
- * @typedef {Object} Static
247
- * @property {string} [directory]
248
- * @property {string | string[]} [publicPath]
249
- * @property {boolean | ServeIndexOptions} [serveIndex]
250
- * @property {ServeStaticOptions} [staticOptions]
251
- * @property {boolean | WatchOptions & { aggregateTimeout?: number, ignored?: AnymatchMatcher | string[], poll?: number | boolean }} [watch]
252
- */
253
- /**
254
- * @typedef {Object} NormalizedStatic
255
- * @property {string} directory
256
- * @property {string[]} publicPath
257
- * @property {false | ServeIndexOptions} serveIndex
258
- * @property {ServeStaticOptions} staticOptions
259
- * @property {false | WatchOptions} watch
260
- */
261
- /**
262
- * @typedef {Object} ServerConfiguration
263
- * @property {"http" | "https" | "spdy" | string} [type]
264
- * @property {ServerOptions} [options]
265
- */
266
- /**
267
- * @typedef {Object} WebSocketServerConfiguration
268
- * @property {"sockjs" | "ws" | string | Function} [type]
269
- * @property {Record<string, any>} [options]
270
- */
271
- /**
272
- * @typedef {(import("ws").WebSocket | import("sockjs").Connection & { send: import("ws").WebSocket["send"], terminate: import("ws").WebSocket["terminate"], ping: import("ws").WebSocket["ping"] }) & { isAlive?: boolean }} ClientConnection
273
- */
274
- /**
275
- * @typedef {import("ws").WebSocketServer | import("sockjs").Server & { close: import("ws").WebSocketServer["close"] }} WebSocketServer
276
- */
277
- /**
278
- * @typedef {{ implementation: WebSocketServer, clients: ClientConnection[] }} WebSocketServerImplementation
279
- */
280
- /**
281
- * @callback ByPass
282
- * @param {Request} req
283
- * @param {Response} res
284
- * @param {ProxyConfigArrayItem} proxyConfig
285
- */
286
- /**
287
- * @typedef {{ path?: HttpProxyMiddlewareOptionsFilter | undefined, context?: HttpProxyMiddlewareOptionsFilter | undefined } & { bypass?: ByPass } & HttpProxyMiddlewareOptions } ProxyConfigArrayItem
288
- */
289
- /**
290
- * @typedef {(ProxyConfigArrayItem | ((req?: Request | undefined, res?: Response | undefined, next?: NextFunction | undefined) => ProxyConfigArrayItem))[]} ProxyConfigArray
291
- */
292
- /**
293
- * @typedef {{ [url: string]: string | ProxyConfigArrayItem }} ProxyConfigMap
294
- */
295
- /**
296
- * @typedef {Object} OpenApp
297
- * @property {string} [name]
298
- * @property {string[]} [arguments]
299
- */
300
- /**
301
- * @typedef {Object} Open
302
- * @property {string | string[] | OpenApp} [app]
303
- * @property {string | string[]} [target]
304
- */
305
- /**
306
- * @typedef {Object} NormalizedOpen
307
- * @property {string} target
308
- * @property {import("open").Options} options
309
- */
310
- /**
311
- * @typedef {Object} WebSocketURL
312
- * @property {string} [hostname]
313
- * @property {string} [password]
314
- * @property {string} [pathname]
315
- * @property {number | string} [port]
316
- * @property {string} [protocol]
317
- * @property {string} [username]
318
- */
319
- /**
320
- * @typedef {Object} ClientConfiguration
321
- * @property {"log" | "info" | "warn" | "error" | "none" | "verbose"} [logging]
322
- * @property {boolean | { warnings?: boolean, errors?: boolean }} [overlay]
323
- * @property {boolean} [progress]
324
- * @property {boolean | number} [reconnect]
325
- * @property {"ws" | "sockjs" | string} [webSocketTransport]
326
- * @property {string | WebSocketURL} [webSocketURL]
327
- */
328
- /**
329
- * @typedef {Array<{ key: string; value: string }> | Record<string, string | string[]>} Headers
330
- */
331
- /**
332
- * @typedef {{ name?: string, path?: string, middleware: ExpressRequestHandler | ExpressErrorRequestHandler } | ExpressRequestHandler | ExpressErrorRequestHandler} Middleware
333
- */
334
- /**
335
- * @typedef {Object} Configuration
336
- * @property {boolean | string} [ipc]
337
- * @property {Host} [host]
338
- * @property {Port} [port]
339
- * @property {boolean | "only"} [hot]
340
- * @property {boolean} [liveReload]
341
- * @property {DevMiddlewareOptions<Request, Response>} [devMiddleware]
342
- * @property {boolean} [compress]
343
- * @property {boolean} [magicHtml]
344
- * @property {"auto" | "all" | string | string[]} [allowedHosts]
345
- * @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
346
- * @property {boolean} [setupExitSignals]
347
- * @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
348
- * @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
349
- * @property {boolean | string | Static | Array<string | Static>} [static]
350
- * @property {boolean | ServerOptions} [https]
351
- * @property {boolean} [http2]
352
- * @property {"http" | "https" | "spdy" | string | ServerConfiguration} [server]
353
- * @property {boolean | "sockjs" | "ws" | string | WebSocketServerConfiguration} [webSocketServer]
354
- * @property {ProxyConfigMap | ProxyConfigArrayItem | ProxyConfigArray} [proxy]
355
- * @property {boolean | string | Open | Array<string | Open>} [open]
356
- * @property {boolean} [setupExitSignals]
357
- * @property {boolean | ClientConfiguration} [client]
358
- * @property {Headers | ((req: Request, res: Response, context: DevMiddlewareContext<Request, Response>) => Headers)} [headers]
359
- * @property {(devServer: Server) => void} [onAfterSetupMiddleware]
360
- * @property {(devServer: Server) => void} [onBeforeSetupMiddleware]
361
- * @property {(devServer: Server) => void} [onListening]
362
- * @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
363
- */
364
374
  type: string;
365
375
  multiple: boolean;
366
376
  description: string;
@@ -383,6 +393,17 @@ declare class Server {
383
393
  simpleType: string;
384
394
  multiple: boolean;
385
395
  };
396
+ "client-overlay-trusted-types-policy-name": {
397
+ configs: {
398
+ description: string;
399
+ multiple: boolean;
400
+ path: string;
401
+ type: string;
402
+ }[];
403
+ description: string;
404
+ multiple: boolean;
405
+ simpleType: string;
406
+ };
386
407
  "client-overlay-warnings": {
387
408
  configs: {
388
409
  type: string;
@@ -407,6 +428,60 @@ declare class Server {
407
428
  simpleType: string;
408
429
  multiple: boolean;
409
430
  };
431
+ /**
432
+ * @typedef {Object} WebSocketURL
433
+ * @property {string} [hostname]
434
+ * @property {string} [password]
435
+ * @property {string} [pathname]
436
+ * @property {number | string} [port]
437
+ * @property {string} [protocol]
438
+ * @property {string} [username]
439
+ */
440
+ /**
441
+ * @typedef {Object} ClientConfiguration
442
+ * @property {"log" | "info" | "warn" | "error" | "none" | "verbose"} [logging]
443
+ * @property {boolean | { warnings?: boolean, errors?: boolean }} [overlay]
444
+ * @property {boolean} [progress]
445
+ * @property {boolean | number} [reconnect]
446
+ * @property {"ws" | "sockjs" | string} [webSocketTransport]
447
+ * @property {string | WebSocketURL} [webSocketURL]
448
+ */
449
+ /**
450
+ * @typedef {Array<{ key: string; value: string }> | Record<string, string | string[]>} Headers
451
+ */
452
+ /**
453
+ * @typedef {{ name?: string, path?: string, middleware: ExpressRequestHandler | ExpressErrorRequestHandler } | ExpressRequestHandler | ExpressErrorRequestHandler} Middleware
454
+ */
455
+ /**
456
+ * @typedef {Object} Configuration
457
+ * @property {boolean | string} [ipc]
458
+ * @property {Host} [host]
459
+ * @property {Port} [port]
460
+ * @property {boolean | "only"} [hot]
461
+ * @property {boolean} [liveReload]
462
+ * @property {DevMiddlewareOptions<Request, Response>} [devMiddleware]
463
+ * @property {boolean} [compress]
464
+ * @property {boolean} [magicHtml]
465
+ * @property {"auto" | "all" | string | string[]} [allowedHosts]
466
+ * @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
467
+ * @property {boolean} [setupExitSignals]
468
+ * @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
469
+ * @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
470
+ * @property {boolean | string | Static | Array<string | Static>} [static]
471
+ * @property {boolean | ServerOptions} [https]
472
+ * @property {boolean} [http2]
473
+ * @property {"http" | "https" | "spdy" | string | ServerConfiguration} [server]
474
+ * @property {boolean | "sockjs" | "ws" | string | WebSocketServerConfiguration} [webSocketServer]
475
+ * @property {ProxyConfigMap | ProxyConfigArrayItem | ProxyConfigArray} [proxy]
476
+ * @property {boolean | string | Open | Array<string | Open>} [open]
477
+ * @property {boolean} [setupExitSignals]
478
+ * @property {boolean | ClientConfiguration} [client]
479
+ * @property {Headers | ((req: Request, res: Response, context: DevMiddlewareContext<Request, Response>) => Headers)} [headers]
480
+ * @property {(devServer: Server) => void} [onAfterSetupMiddleware]
481
+ * @property {(devServer: Server) => void} [onBeforeSetupMiddleware]
482
+ * @property {(devServer: Server) => void} [onListening]
483
+ * @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
484
+ */
410
485
  "client-reconnect": {
411
486
  configs: (
412
487
  | {
@@ -499,6 +574,9 @@ declare class Server {
499
574
  path: string;
500
575
  }[];
501
576
  description: string;
577
+ /**
578
+ * @type {FSWatcher[]}
579
+ */
502
580
  simpleType: string;
503
581
  multiple: boolean;
504
582
  };
@@ -508,7 +586,7 @@ declare class Server {
508
586
  description: string;
509
587
  multiple: boolean;
510
588
  path: string;
511
- /** @type {Compiler | MultiCompiler} */ type: string;
589
+ type: string;
512
590
  values: string[];
513
591
  }
514
592
  | {
@@ -524,26 +602,19 @@ declare class Server {
524
602
  };
525
603
  "client-web-socket-url-username": {
526
604
  configs: {
527
- /**
528
- * @private
529
- * @type {RequestHandler[]}
530
- */
531
605
  type: string;
532
606
  multiple: boolean;
533
607
  description: string;
534
- /**
535
- * @type {Socket[]}
536
- */
537
608
  path: string;
538
609
  }[];
539
- /**
540
- * @private
541
- * @type {string | undefined}
542
- */
543
610
  description: string;
544
611
  simpleType: string;
545
612
  multiple: boolean;
546
613
  };
614
+ /**
615
+ * @param {string} URL
616
+ * @returns {boolean}
617
+ */
547
618
  compress: {
548
619
  configs: {
549
620
  type: string;
@@ -554,6 +625,10 @@ declare class Server {
554
625
  }[];
555
626
  description: string;
556
627
  simpleType: string;
628
+ /**
629
+ * @param {string} gateway
630
+ * @returns {string | undefined}
631
+ */
557
632
  multiple: boolean;
558
633
  };
559
634
  "history-api-fallback": {
@@ -586,6 +661,10 @@ declare class Server {
586
661
  )[];
587
662
  description: string;
588
663
  simpleType: string;
664
+ /**
665
+ * @param {Host} hostname
666
+ * @returns {Promise<string>}
667
+ */
589
668
  multiple: boolean;
590
669
  };
591
670
  hot: {
@@ -647,6 +726,9 @@ declare class Server {
647
726
  "https-ca-reset": {
648
727
  configs: {
649
728
  description: string;
729
+ /**
730
+ * @type {string[]}
731
+ */
650
732
  multiple: boolean;
651
733
  path: string;
652
734
  type: string;
@@ -675,7 +757,6 @@ declare class Server {
675
757
  }[];
676
758
  description: string;
677
759
  multiple: boolean;
678
- /** @type {{ type: WebSocketServerConfiguration["type"], options: NonNullable<WebSocketServerConfiguration["options"]> }} */
679
760
  simpleType: string;
680
761
  };
681
762
  "https-cert": {
@@ -689,7 +770,6 @@ declare class Server {
689
770
  simpleType: string;
690
771
  multiple: boolean;
691
772
  };
692
- /** @type {ServerConfiguration} */
693
773
  "https-cert-reset": {
694
774
  configs: {
695
775
  description: string;
@@ -716,7 +796,7 @@ declare class Server {
716
796
  configs: {
717
797
  description: string;
718
798
  multiple: boolean;
719
- /** @type {number | string} */ path: string;
799
+ path: string;
720
800
  type: string;
721
801
  }[];
722
802
  description: string;
@@ -738,7 +818,7 @@ declare class Server {
738
818
  configs: {
739
819
  description: string;
740
820
  multiple: boolean;
741
- /** @type {string} */ path: string;
821
+ path: string;
742
822
  type: string;
743
823
  }[];
744
824
  description: string;
@@ -783,7 +863,7 @@ declare class Server {
783
863
  type: string;
784
864
  multiple: boolean;
785
865
  description: string;
786
- negatedDescription: string;
866
+ /** @type {Object<string,string>} */ negatedDescription: string;
787
867
  path: string;
788
868
  }[];
789
869
  description: string;
@@ -795,12 +875,13 @@ declare class Server {
795
875
  | {
796
876
  type: string;
797
877
  multiple: boolean;
878
+ /** @type {any} */
798
879
  description: string;
799
880
  path: string;
800
881
  }
801
882
  | {
802
883
  type: string;
803
- values: boolean[];
884
+ /** @type {any} */ values: boolean[];
804
885
  multiple: boolean;
805
886
  description: string;
806
887
  path: string;
@@ -831,7 +912,7 @@ declare class Server {
831
912
  path: string;
832
913
  }[];
833
914
  description: string;
834
- /** @type {MultiCompiler} */ simpleType: string;
915
+ simpleType: string;
835
916
  multiple: boolean;
836
917
  };
837
918
  open: {
@@ -850,7 +931,7 @@ declare class Server {
850
931
  path: string;
851
932
  }
852
933
  )[];
853
- description: string;
934
+ /** @type {Compiler} */ description: string;
854
935
  simpleType: string;
855
936
  multiple: boolean;
856
937
  };
@@ -865,10 +946,6 @@ declare class Server {
865
946
  simpleType: string;
866
947
  multiple: boolean;
867
948
  };
868
- /**
869
- * @private
870
- * @returns {Promise<void>}
871
- */
872
949
  "open-app-name": {
873
950
  configs: {
874
951
  type: string;
@@ -910,7 +987,7 @@ declare class Server {
910
987
  path: string;
911
988
  }[];
912
989
  description: string;
913
- simpleType: string;
990
+ /** @type {NormalizedStatic} */ simpleType: string;
914
991
  multiple: boolean;
915
992
  };
916
993
  "open-target-reset": {
@@ -928,7 +1005,7 @@ declare class Server {
928
1005
  configs: (
929
1006
  | {
930
1007
  type: string;
931
- /** @type {NormalizedStatic} */ multiple: boolean;
1008
+ multiple: boolean;
932
1009
  description: string;
933
1010
  path: string;
934
1011
  }
@@ -1085,8 +1162,9 @@ declare class Server {
1085
1162
  }[];
1086
1163
  description: string;
1087
1164
  multiple: boolean;
1088
- simpleType: string;
1165
+ simpleType: string /** @type {ServerOptions} */;
1089
1166
  };
1167
+ /** @type {ServerOptions} */
1090
1168
  "server-options-request-cert": {
1091
1169
  configs: {
1092
1170
  description: string;
@@ -1109,9 +1187,8 @@ declare class Server {
1109
1187
  }[];
1110
1188
  description: string;
1111
1189
  multiple: boolean;
1112
- simpleType: string /** @type {Array<keyof ServerOptions>} */;
1190
+ simpleType: string;
1113
1191
  };
1114
- /** @type {Array<keyof ServerOptions>} */
1115
1192
  static: {
1116
1193
  configs: (
1117
1194
  | {
@@ -1123,16 +1200,19 @@ declare class Server {
1123
1200
  | {
1124
1201
  type: string;
1125
1202
  multiple: boolean;
1203
+ /**
1204
+ * @param {string | Buffer | undefined} item
1205
+ * @returns {string | Buffer | undefined}
1206
+ */
1126
1207
  description: string;
1127
1208
  negatedDescription: string;
1128
1209
  path: string;
1129
1210
  }
1130
1211
  )[];
1131
1212
  description: string;
1132
- /** @type {any} */ simpleType: string;
1133
- multiple: boolean /** @type {ServerOptions} */;
1213
+ simpleType: string;
1214
+ multiple: boolean;
1134
1215
  };
1135
- /** @type {ServerOptions} */
1136
1216
  "static-directory": {
1137
1217
  configs: {
1138
1218
  type: string;
@@ -1140,7 +1220,7 @@ declare class Server {
1140
1220
  description: string;
1141
1221
  path: string;
1142
1222
  }[];
1143
- description: string;
1223
+ /** @type {any} */ description: string;
1144
1224
  simpleType: string;
1145
1225
  multiple: boolean;
1146
1226
  };
@@ -1159,7 +1239,7 @@ declare class Server {
1159
1239
  configs: {
1160
1240
  type: string;
1161
1241
  multiple: boolean;
1162
- /** @type {ServerOptions} */ description: string;
1242
+ description: string;
1163
1243
  path: string;
1164
1244
  }[];
1165
1245
  description: string;
@@ -1244,11 +1324,12 @@ declare class Server {
1244
1324
  description: string;
1245
1325
  multiple: boolean;
1246
1326
  path: string;
1247
- /** @type {ServerOptions & { cacert?: ServerOptions["ca"] }} */
1248
1327
  type: string;
1249
1328
  }
1250
1329
  )[];
1330
+ /** @type {ServerOptions & { cacert?: ServerOptions["ca"] }} */
1251
1331
  description: string;
1332
+ /** @type {ServerOptions} */
1252
1333
  simpleType: string;
1253
1334
  multiple: boolean;
1254
1335
  };
@@ -1363,6 +1444,151 @@ declare class Server {
1363
1444
  logging: {
1364
1445
  $ref: string;
1365
1446
  };
1447
+ /** @typedef {import("serve-static").ServeStaticOptions} ServeStaticOptions */
1448
+ /** @typedef {import("ipaddr.js").IPv4} IPv4 */
1449
+ /** @typedef {import("ipaddr.js").IPv6} IPv6 */
1450
+ /** @typedef {import("net").Socket} Socket */
1451
+ /** @typedef {import("http").IncomingMessage} IncomingMessage */
1452
+ /** @typedef {import("open").Options} OpenOptions */
1453
+ /** @typedef {import("https").ServerOptions & { spdy?: { plain?: boolean | undefined, ssl?: boolean | undefined, 'x-forwarded-for'?: string | undefined, protocol?: string | undefined, protocols?: string[] | undefined }}} ServerOptions */
1454
+ /**
1455
+ * @template Request, Response
1456
+ * @typedef {import("webpack-dev-middleware").Options<Request, Response>} DevMiddlewareOptions
1457
+ */
1458
+ /**
1459
+ * @template Request, Response
1460
+ * @typedef {import("webpack-dev-middleware").Context<Request, Response>} DevMiddlewareContext
1461
+ */
1462
+ /**
1463
+ * @typedef {"local-ip" | "local-ipv4" | "local-ipv6" | string} Host
1464
+ */
1465
+ /**
1466
+ * @typedef {number | string | "auto"} Port
1467
+ */
1468
+ /**
1469
+ * @typedef {Object} WatchFiles
1470
+ * @property {string | string[]} paths
1471
+ * @property {WatchOptions & { aggregateTimeout?: number, ignored?: WatchOptions["ignored"], poll?: number | boolean }} [options]
1472
+ */
1473
+ /**
1474
+ * @typedef {Object} Static
1475
+ * @property {string} [directory]
1476
+ * @property {string | string[]} [publicPath]
1477
+ * @property {boolean | ServeIndexOptions} [serveIndex]
1478
+ * @property {ServeStaticOptions} [staticOptions]
1479
+ * @property {boolean | WatchOptions & { aggregateTimeout?: number, ignored?: WatchOptions["ignored"], poll?: number | boolean }} [watch]
1480
+ */
1481
+ /**
1482
+ * @typedef {Object} NormalizedStatic
1483
+ * @property {string} directory
1484
+ * @property {string[]} publicPath
1485
+ * @property {false | ServeIndexOptions} serveIndex
1486
+ * @property {ServeStaticOptions} staticOptions
1487
+ * @property {false | WatchOptions} watch
1488
+ */
1489
+ /**
1490
+ * @typedef {Object} ServerConfiguration
1491
+ * @property {"http" | "https" | "spdy" | string} [type]
1492
+ * @property {ServerOptions} [options]
1493
+ */
1494
+ /**
1495
+ * @typedef {Object} WebSocketServerConfiguration
1496
+ * @property {"sockjs" | "ws" | string | Function} [type]
1497
+ * @property {Record<string, any>} [options]
1498
+ */
1499
+ /**
1500
+ * @typedef {(import("ws").WebSocket | import("sockjs").Connection & { send: import("ws").WebSocket["send"], terminate: import("ws").WebSocket["terminate"], ping: import("ws").WebSocket["ping"] }) & { isAlive?: boolean }} ClientConnection
1501
+ */
1502
+ /**
1503
+ * @typedef {import("ws").WebSocketServer | import("sockjs").Server & { close: import("ws").WebSocketServer["close"] }} WebSocketServer
1504
+ */
1505
+ /**
1506
+ * @typedef {{ implementation: WebSocketServer, clients: ClientConnection[] }} WebSocketServerImplementation
1507
+ */
1508
+ /**
1509
+ * @callback ByPass
1510
+ * @param {Request} req
1511
+ * @param {Response} res
1512
+ * @param {ProxyConfigArrayItem} proxyConfig
1513
+ */
1514
+ /**
1515
+ * @typedef {{ path?: HttpProxyMiddlewareOptionsFilter | undefined, context?: HttpProxyMiddlewareOptionsFilter | undefined } & { bypass?: ByPass } & HttpProxyMiddlewareOptions } ProxyConfigArrayItem
1516
+ */
1517
+ /**
1518
+ * @typedef {(ProxyConfigArrayItem | ((req?: Request | undefined, res?: Response | undefined, next?: NextFunction | undefined) => ProxyConfigArrayItem))[]} ProxyConfigArray
1519
+ */
1520
+ /**
1521
+ * @typedef {{ [url: string]: string | ProxyConfigArrayItem }} ProxyConfigMap
1522
+ */
1523
+ /**
1524
+ * @typedef {Object} OpenApp
1525
+ * @property {string} [name]
1526
+ * @property {string[]} [arguments]
1527
+ */
1528
+ /**
1529
+ * @typedef {Object} Open
1530
+ * @property {string | string[] | OpenApp} [app]
1531
+ * @property {string | string[]} [target]
1532
+ */
1533
+ /**
1534
+ * @typedef {Object} NormalizedOpen
1535
+ * @property {string} target
1536
+ * @property {import("open").Options} options
1537
+ */
1538
+ /**
1539
+ * @typedef {Object} WebSocketURL
1540
+ * @property {string} [hostname]
1541
+ * @property {string} [password]
1542
+ * @property {string} [pathname]
1543
+ * @property {number | string} [port]
1544
+ * @property {string} [protocol]
1545
+ * @property {string} [username]
1546
+ */
1547
+ /**
1548
+ * @typedef {Object} ClientConfiguration
1549
+ * @property {"log" | "info" | "warn" | "error" | "none" | "verbose"} [logging]
1550
+ * @property {boolean | { warnings?: boolean, errors?: boolean }} [overlay]
1551
+ * @property {boolean} [progress]
1552
+ * @property {boolean | number} [reconnect]
1553
+ * @property {"ws" | "sockjs" | string} [webSocketTransport]
1554
+ * @property {string | WebSocketURL} [webSocketURL]
1555
+ */
1556
+ /**
1557
+ * @typedef {Array<{ key: string; value: string }> | Record<string, string | string[]>} Headers
1558
+ */
1559
+ /**
1560
+ * @typedef {{ name?: string, path?: string, middleware: ExpressRequestHandler | ExpressErrorRequestHandler } | ExpressRequestHandler | ExpressErrorRequestHandler} Middleware
1561
+ */
1562
+ /**
1563
+ * @typedef {Object} Configuration
1564
+ * @property {boolean | string} [ipc]
1565
+ * @property {Host} [host]
1566
+ * @property {Port} [port]
1567
+ * @property {boolean | "only"} [hot]
1568
+ * @property {boolean} [liveReload]
1569
+ * @property {DevMiddlewareOptions<Request, Response>} [devMiddleware]
1570
+ * @property {boolean} [compress]
1571
+ * @property {boolean} [magicHtml]
1572
+ * @property {"auto" | "all" | string | string[]} [allowedHosts]
1573
+ * @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
1574
+ * @property {boolean} [setupExitSignals]
1575
+ * @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
1576
+ * @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
1577
+ * @property {boolean | string | Static | Array<string | Static>} [static]
1578
+ * @property {boolean | ServerOptions} [https]
1579
+ * @property {boolean} [http2]
1580
+ * @property {"http" | "https" | "spdy" | string | ServerConfiguration} [server]
1581
+ * @property {boolean | "sockjs" | "ws" | string | WebSocketServerConfiguration} [webSocketServer]
1582
+ * @property {ProxyConfigMap | ProxyConfigArrayItem | ProxyConfigArray} [proxy]
1583
+ * @property {boolean | string | Open | Array<string | Open>} [open]
1584
+ * @property {boolean} [setupExitSignals]
1585
+ * @property {boolean | ClientConfiguration} [client]
1586
+ * @property {Headers | ((req: Request, res: Response, context: DevMiddlewareContext<Request, Response>) => Headers)} [headers]
1587
+ * @property {(devServer: Server) => void} [onAfterSetupMiddleware]
1588
+ * @property {(devServer: Server) => void} [onBeforeSetupMiddleware]
1589
+ * @property {(devServer: Server) => void} [onListening]
1590
+ * @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
1591
+ */
1366
1592
  overlay: {
1367
1593
  $ref: string;
1368
1594
  };
@@ -1413,123 +1639,16 @@ declare class Server {
1413
1639
  };
1414
1640
  };
1415
1641
  warnings: {
1416
- /**
1417
- * @typedef {Object} NormalizedStatic
1418
- * @property {string} directory
1419
- * @property {string[]} publicPath
1420
- * @property {false | ServeIndexOptions} serveIndex
1421
- * @property {ServeStaticOptions} staticOptions
1422
- * @property {false | WatchOptions} watch
1423
- */
1424
- /**
1425
- * @typedef {Object} ServerConfiguration
1426
- * @property {"http" | "https" | "spdy" | string} [type]
1427
- * @property {ServerOptions} [options]
1428
- */
1429
- /**
1430
- * @typedef {Object} WebSocketServerConfiguration
1431
- * @property {"sockjs" | "ws" | string | Function} [type]
1432
- * @property {Record<string, any>} [options]
1433
- */
1434
- /**
1435
- * @typedef {(import("ws").WebSocket | import("sockjs").Connection & { send: import("ws").WebSocket["send"], terminate: import("ws").WebSocket["terminate"], ping: import("ws").WebSocket["ping"] }) & { isAlive?: boolean }} ClientConnection
1436
- */
1437
- /**
1438
- * @typedef {import("ws").WebSocketServer | import("sockjs").Server & { close: import("ws").WebSocketServer["close"] }} WebSocketServer
1439
- */
1440
- /**
1441
- * @typedef {{ implementation: WebSocketServer, clients: ClientConnection[] }} WebSocketServerImplementation
1442
- */
1443
- /**
1444
- * @callback ByPass
1445
- * @param {Request} req
1446
- * @param {Response} res
1447
- * @param {ProxyConfigArrayItem} proxyConfig
1448
- */
1449
- /**
1450
- * @typedef {{ path?: HttpProxyMiddlewareOptionsFilter | undefined, context?: HttpProxyMiddlewareOptionsFilter | undefined } & { bypass?: ByPass } & HttpProxyMiddlewareOptions } ProxyConfigArrayItem
1451
- */
1452
- /**
1453
- * @typedef {(ProxyConfigArrayItem | ((req?: Request | undefined, res?: Response | undefined, next?: NextFunction | undefined) => ProxyConfigArrayItem))[]} ProxyConfigArray
1454
- */
1455
- /**
1456
- * @typedef {{ [url: string]: string | ProxyConfigArrayItem }} ProxyConfigMap
1457
- */
1458
- /**
1459
- * @typedef {Object} OpenApp
1460
- * @property {string} [name]
1461
- * @property {string[]} [arguments]
1462
- */
1463
- /**
1464
- * @typedef {Object} Open
1465
- * @property {string | string[] | OpenApp} [app]
1466
- * @property {string | string[]} [target]
1467
- */
1468
- /**
1469
- * @typedef {Object} NormalizedOpen
1470
- * @property {string} target
1471
- * @property {import("open").Options} options
1472
- */
1473
- /**
1474
- * @typedef {Object} WebSocketURL
1475
- * @property {string} [hostname]
1476
- * @property {string} [password]
1477
- * @property {string} [pathname]
1478
- * @property {number | string} [port]
1479
- * @property {string} [protocol]
1480
- * @property {string} [username]
1481
- */
1482
- /**
1483
- * @typedef {Object} ClientConfiguration
1484
- * @property {"log" | "info" | "warn" | "error" | "none" | "verbose"} [logging]
1485
- * @property {boolean | { warnings?: boolean, errors?: boolean }} [overlay]
1486
- * @property {boolean} [progress]
1487
- * @property {boolean | number} [reconnect]
1488
- * @property {"ws" | "sockjs" | string} [webSocketTransport]
1489
- * @property {string | WebSocketURL} [webSocketURL]
1490
- */
1491
- /**
1492
- * @typedef {Array<{ key: string; value: string }> | Record<string, string | string[]>} Headers
1493
- */
1494
- /**
1495
- * @typedef {{ name?: string, path?: string, middleware: ExpressRequestHandler | ExpressErrorRequestHandler } | ExpressRequestHandler | ExpressErrorRequestHandler} Middleware
1496
- */
1497
- /**
1498
- * @typedef {Object} Configuration
1499
- * @property {boolean | string} [ipc]
1500
- * @property {Host} [host]
1501
- * @property {Port} [port]
1502
- * @property {boolean | "only"} [hot]
1503
- * @property {boolean} [liveReload]
1504
- * @property {DevMiddlewareOptions<Request, Response>} [devMiddleware]
1505
- * @property {boolean} [compress]
1506
- * @property {boolean} [magicHtml]
1507
- * @property {"auto" | "all" | string | string[]} [allowedHosts]
1508
- * @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
1509
- * @property {boolean} [setupExitSignals]
1510
- * @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
1511
- * @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
1512
- * @property {boolean | string | Static | Array<string | Static>} [static]
1513
- * @property {boolean | ServerOptions} [https]
1514
- * @property {boolean} [http2]
1515
- * @property {"http" | "https" | "spdy" | string | ServerConfiguration} [server]
1516
- * @property {boolean | "sockjs" | "ws" | string | WebSocketServerConfiguration} [webSocketServer]
1517
- * @property {ProxyConfigMap | ProxyConfigArrayItem | ProxyConfigArray} [proxy]
1518
- * @property {boolean | string | Open | Array<string | Open>} [open]
1519
- * @property {boolean} [setupExitSignals]
1520
- * @property {boolean | ClientConfiguration} [client]
1521
- * @property {Headers | ((req: Request, res: Response, context: DevMiddlewareContext<Request, Response>) => Headers)} [headers]
1522
- * @property {(devServer: Server) => void} [onAfterSetupMiddleware]
1523
- * @property {(devServer: Server) => void} [onBeforeSetupMiddleware]
1524
- * @property {(devServer: Server) => void} [onListening]
1525
- * @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
1526
- */
1527
1642
  description: string;
1528
1643
  type: string;
1529
1644
  cli: {
1530
1645
  negatedDescription: string;
1531
1646
  };
1532
1647
  };
1648
+ trustedTypesPolicyName: {
1649
+ description: string;
1650
+ type: string;
1651
+ };
1533
1652
  };
1534
1653
  description?: undefined;
1535
1654
  link?: undefined;
@@ -1550,6 +1669,84 @@ declare class Server {
1550
1669
  link: string;
1551
1670
  anyOf: (
1552
1671
  | {
1672
+ /**
1673
+ * @typedef {{ path?: HttpProxyMiddlewareOptionsFilter | undefined, context?: HttpProxyMiddlewareOptionsFilter | undefined } & { bypass?: ByPass } & HttpProxyMiddlewareOptions } ProxyConfigArrayItem
1674
+ */
1675
+ /**
1676
+ * @typedef {(ProxyConfigArrayItem | ((req?: Request | undefined, res?: Response | undefined, next?: NextFunction | undefined) => ProxyConfigArrayItem))[]} ProxyConfigArray
1677
+ */
1678
+ /**
1679
+ * @typedef {{ [url: string]: string | ProxyConfigArrayItem }} ProxyConfigMap
1680
+ */
1681
+ /**
1682
+ * @typedef {Object} OpenApp
1683
+ * @property {string} [name]
1684
+ * @property {string[]} [arguments]
1685
+ */
1686
+ /**
1687
+ * @typedef {Object} Open
1688
+ * @property {string | string[] | OpenApp} [app]
1689
+ * @property {string | string[]} [target]
1690
+ */
1691
+ /**
1692
+ * @typedef {Object} NormalizedOpen
1693
+ * @property {string} target
1694
+ * @property {import("open").Options} options
1695
+ */
1696
+ /**
1697
+ * @typedef {Object} WebSocketURL
1698
+ * @property {string} [hostname]
1699
+ * @property {string} [password]
1700
+ * @property {string} [pathname]
1701
+ * @property {number | string} [port]
1702
+ * @property {string} [protocol]
1703
+ * @property {string} [username]
1704
+ */
1705
+ /**
1706
+ * @typedef {Object} ClientConfiguration
1707
+ * @property {"log" | "info" | "warn" | "error" | "none" | "verbose"} [logging]
1708
+ * @property {boolean | { warnings?: boolean, errors?: boolean }} [overlay]
1709
+ * @property {boolean} [progress]
1710
+ * @property {boolean | number} [reconnect]
1711
+ * @property {"ws" | "sockjs" | string} [webSocketTransport]
1712
+ * @property {string | WebSocketURL} [webSocketURL]
1713
+ */
1714
+ /**
1715
+ * @typedef {Array<{ key: string; value: string }> | Record<string, string | string[]>} Headers
1716
+ */
1717
+ /**
1718
+ * @typedef {{ name?: string, path?: string, middleware: ExpressRequestHandler | ExpressErrorRequestHandler } | ExpressRequestHandler | ExpressErrorRequestHandler} Middleware
1719
+ */
1720
+ /**
1721
+ * @typedef {Object} Configuration
1722
+ * @property {boolean | string} [ipc]
1723
+ * @property {Host} [host]
1724
+ * @property {Port} [port]
1725
+ * @property {boolean | "only"} [hot]
1726
+ * @property {boolean} [liveReload]
1727
+ * @property {DevMiddlewareOptions<Request, Response>} [devMiddleware]
1728
+ * @property {boolean} [compress]
1729
+ * @property {boolean} [magicHtml]
1730
+ * @property {"auto" | "all" | string | string[]} [allowedHosts]
1731
+ * @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
1732
+ * @property {boolean} [setupExitSignals]
1733
+ * @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
1734
+ * @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
1735
+ * @property {boolean | string | Static | Array<string | Static>} [static]
1736
+ * @property {boolean | ServerOptions} [https]
1737
+ * @property {boolean} [http2]
1738
+ * @property {"http" | "https" | "spdy" | string | ServerConfiguration} [server]
1739
+ * @property {boolean | "sockjs" | "ws" | string | WebSocketServerConfiguration} [webSocketServer]
1740
+ * @property {ProxyConfigMap | ProxyConfigArrayItem | ProxyConfigArray} [proxy]
1741
+ * @property {boolean | string | Open | Array<string | Open>} [open]
1742
+ * @property {boolean} [setupExitSignals]
1743
+ * @property {boolean | ClientConfiguration} [client]
1744
+ * @property {Headers | ((req: Request, res: Response, context: DevMiddlewareContext<Request, Response>) => Headers)} [headers]
1745
+ * @property {(devServer: Server) => void} [onAfterSetupMiddleware]
1746
+ * @property {(devServer: Server) => void} [onBeforeSetupMiddleware]
1747
+ * @property {(devServer: Server) => void} [onListening]
1748
+ * @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
1749
+ */
1553
1750
  type: string;
1554
1751
  cli: {
1555
1752
  negatedDescription: string;
@@ -1567,6 +1764,75 @@ declare class Server {
1567
1764
  anyOf: {
1568
1765
  $ref: string;
1569
1766
  }[];
1767
+ /**
1768
+ * @typedef {Object} OpenApp
1769
+ * @property {string} [name]
1770
+ * @property {string[]} [arguments]
1771
+ */
1772
+ /**
1773
+ * @typedef {Object} Open
1774
+ * @property {string | string[] | OpenApp} [app]
1775
+ * @property {string | string[]} [target]
1776
+ */
1777
+ /**
1778
+ * @typedef {Object} NormalizedOpen
1779
+ * @property {string} target
1780
+ * @property {import("open").Options} options
1781
+ */
1782
+ /**
1783
+ * @typedef {Object} WebSocketURL
1784
+ * @property {string} [hostname]
1785
+ * @property {string} [password]
1786
+ * @property {string} [pathname]
1787
+ * @property {number | string} [port]
1788
+ * @property {string} [protocol]
1789
+ * @property {string} [username]
1790
+ */
1791
+ /**
1792
+ * @typedef {Object} ClientConfiguration
1793
+ * @property {"log" | "info" | "warn" | "error" | "none" | "verbose"} [logging]
1794
+ * @property {boolean | { warnings?: boolean, errors?: boolean }} [overlay]
1795
+ * @property {boolean} [progress]
1796
+ * @property {boolean | number} [reconnect]
1797
+ * @property {"ws" | "sockjs" | string} [webSocketTransport]
1798
+ * @property {string | WebSocketURL} [webSocketURL]
1799
+ */
1800
+ /**
1801
+ * @typedef {Array<{ key: string; value: string }> | Record<string, string | string[]>} Headers
1802
+ */
1803
+ /**
1804
+ * @typedef {{ name?: string, path?: string, middleware: ExpressRequestHandler | ExpressErrorRequestHandler } | ExpressRequestHandler | ExpressErrorRequestHandler} Middleware
1805
+ */
1806
+ /**
1807
+ * @typedef {Object} Configuration
1808
+ * @property {boolean | string} [ipc]
1809
+ * @property {Host} [host]
1810
+ * @property {Port} [port]
1811
+ * @property {boolean | "only"} [hot]
1812
+ * @property {boolean} [liveReload]
1813
+ * @property {DevMiddlewareOptions<Request, Response>} [devMiddleware]
1814
+ * @property {boolean} [compress]
1815
+ * @property {boolean} [magicHtml]
1816
+ * @property {"auto" | "all" | string | string[]} [allowedHosts]
1817
+ * @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
1818
+ * @property {boolean} [setupExitSignals]
1819
+ * @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
1820
+ * @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
1821
+ * @property {boolean | string | Static | Array<string | Static>} [static]
1822
+ * @property {boolean | ServerOptions} [https]
1823
+ * @property {boolean} [http2]
1824
+ * @property {"http" | "https" | "spdy" | string | ServerConfiguration} [server]
1825
+ * @property {boolean | "sockjs" | "ws" | string | WebSocketServerConfiguration} [webSocketServer]
1826
+ * @property {ProxyConfigMap | ProxyConfigArrayItem | ProxyConfigArray} [proxy]
1827
+ * @property {boolean | string | Open | Array<string | Open>} [open]
1828
+ * @property {boolean} [setupExitSignals]
1829
+ * @property {boolean | ClientConfiguration} [client]
1830
+ * @property {Headers | ((req: Request, res: Response, context: DevMiddlewareContext<Request, Response>) => Headers)} [headers]
1831
+ * @property {(devServer: Server) => void} [onAfterSetupMiddleware]
1832
+ * @property {(devServer: Server) => void} [onBeforeSetupMiddleware]
1833
+ * @property {(devServer: Server) => void} [onListening]
1834
+ * @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
1835
+ */
1570
1836
  description: string;
1571
1837
  link: string;
1572
1838
  };
@@ -1576,6 +1842,15 @@ declare class Server {
1576
1842
  ClientWebSocketTransportString: {
1577
1843
  type: string;
1578
1844
  minLength: number;
1845
+ /**
1846
+ * @typedef {Object} WebSocketURL
1847
+ * @property {string} [hostname]
1848
+ * @property {string} [password]
1849
+ * @property {string} [pathname]
1850
+ * @property {number | string} [port]
1851
+ * @property {string} [protocol]
1852
+ * @property {string} [username]
1853
+ */
1579
1854
  };
1580
1855
  ClientWebSocketURL: {
1581
1856
  description: string;
@@ -1782,6 +2057,10 @@ declare class Server {
1782
2057
  description: string;
1783
2058
  };
1784
2059
  crl: {
2060
+ /**
2061
+ * @param {"v4" | "v6"} family
2062
+ * @returns {Promise<string | undefined>}
2063
+ */
1785
2064
  anyOf: (
1786
2065
  | {
1787
2066
  type: string;
@@ -1810,10 +2089,6 @@ declare class Server {
1810
2089
  items?: undefined;
1811
2090
  }
1812
2091
  )[];
1813
- /**
1814
- * @param {"v4" | "v6"} family
1815
- * @returns {string | undefined}
1816
- */
1817
2092
  description: string;
1818
2093
  };
1819
2094
  key: {
@@ -1919,9 +2194,6 @@ declare class Server {
1919
2194
  Headers: {
1920
2195
  anyOf: (
1921
2196
  | {
1922
- /**
1923
- * @type {string[]}
1924
- */
1925
2197
  type: string;
1926
2198
  items: {
1927
2199
  $ref: string;
@@ -1943,7 +2215,7 @@ declare class Server {
1943
2215
  }
1944
2216
  )[];
1945
2217
  description: string;
1946
- link: string;
2218
+ link: string /** @type {WebSocketURL} */;
1947
2219
  };
1948
2220
  HistoryApiFallback: {
1949
2221
  anyOf: (
@@ -1957,8 +2229,9 @@ declare class Server {
1957
2229
  }
1958
2230
  | {
1959
2231
  type: string;
1960
- /** @type {WebSocketURL} */ description: string;
2232
+ description: string;
1961
2233
  link: string;
2234
+ /** @type {string} */
1962
2235
  cli?: undefined /** @typedef {import("express").Request} Request */;
1963
2236
  }
1964
2237
  )[];
@@ -1971,7 +2244,7 @@ declare class Server {
1971
2244
  anyOf: (
1972
2245
  | {
1973
2246
  enum: string[];
1974
- /** @type {ServerConfiguration} */ type?: undefined;
2247
+ type?: undefined;
1975
2248
  minLength?: undefined;
1976
2249
  }
1977
2250
  | {
@@ -2101,6 +2374,12 @@ declare class Server {
2101
2374
  anyOf: (
2102
2375
  | {
2103
2376
  type: string;
2377
+ /**
2378
+ * prependEntry Method for webpack 4
2379
+ * @param {any} originalEntry
2380
+ * @param {any} newAdditionalEntries
2381
+ * @returns {any}
2382
+ */
2104
2383
  items: {
2105
2384
  type: string;
2106
2385
  minLength: number;
@@ -2110,12 +2389,6 @@ declare class Server {
2110
2389
  }
2111
2390
  | {
2112
2391
  type: string;
2113
- /**
2114
- * prependEntry Method for webpack 4
2115
- * @param {any} originalEntry
2116
- * @param {any} newAdditionalEntries
2117
- * @returns {any}
2118
- */
2119
2392
  minLength: number;
2120
2393
  items?: undefined;
2121
2394
  minItems?: undefined;
@@ -2140,7 +2413,6 @@ declare class Server {
2140
2413
  cli: {
2141
2414
  description: string;
2142
2415
  };
2143
- /** @type {Object<string,string>} */
2144
2416
  additionalProperties?: undefined;
2145
2417
  properties?: undefined;
2146
2418
  }
@@ -2149,6 +2421,7 @@ declare class Server {
2149
2421
  };
2150
2422
  };
2151
2423
  };
2424
+ /** @type {any} */
2152
2425
  OpenString: {
2153
2426
  type: string;
2154
2427
  minLength: number;
@@ -2207,7 +2480,7 @@ declare class Server {
2207
2480
  };
2208
2481
  Server: {
2209
2482
  anyOf: {
2210
- $ref: string;
2483
+ $ref: string /** @type {MultiCompiler} */;
2211
2484
  }[];
2212
2485
  link: string;
2213
2486
  description: string;
@@ -2248,7 +2521,7 @@ declare class Server {
2248
2521
  properties: {
2249
2522
  passphrase: {
2250
2523
  type: string;
2251
- /** @type {MultiCompiler} */ description: string;
2524
+ description: string;
2252
2525
  };
2253
2526
  requestCert: {
2254
2527
  type: string;
@@ -2358,6 +2631,7 @@ declare class Server {
2358
2631
  anyOf: (
2359
2632
  | {
2360
2633
  type: string;
2634
+ /** @type {NormalizedStatic} */
2361
2635
  instanceof?: undefined;
2362
2636
  }
2363
2637
  | {
@@ -2375,7 +2649,7 @@ declare class Server {
2375
2649
  }
2376
2650
  | {
2377
2651
  instanceof: string;
2378
- /** @type {NormalizedStatic} */ type?: undefined;
2652
+ type?: undefined;
2379
2653
  items?: undefined;
2380
2654
  }
2381
2655
  )[];
@@ -2641,7 +2915,7 @@ declare class Server {
2641
2915
  $ref: string;
2642
2916
  }[];
2643
2917
  description: string;
2644
- link: string /** @type {Array<keyof ServerOptions>} */;
2918
+ link: string;
2645
2919
  };
2646
2920
  WebSocketServerType: {
2647
2921
  enum: string[];
@@ -2662,7 +2936,7 @@ declare class Server {
2662
2936
  }
2663
2937
  )[];
2664
2938
  cli: {
2665
- description: string;
2939
+ description: string /** @type {any} */;
2666
2940
  };
2667
2941
  };
2668
2942
  WebSocketServerFunction: {
@@ -2800,9 +3074,10 @@ declare class Server {
2800
3074
  static getHostname(hostname: Host): Promise<string>;
2801
3075
  /**
2802
3076
  * @param {Port} port
3077
+ * @param {string} host
2803
3078
  * @returns {Promise<number | string>}
2804
3079
  */
2805
- static getFreePort(port: Port): Promise<number | string>;
3080
+ static getFreePort(port: Port, host: string): Promise<number | string>;
2806
3081
  /**
2807
3082
  * @returns {string}
2808
3083
  */
@@ -3051,9 +3326,7 @@ declare class Server {
3051
3326
  /**
3052
3327
  * @param {(err?: Error) => void} [callback]
3053
3328
  */
3054
- startCallback(
3055
- callback?: ((err?: Error | undefined) => void) | undefined
3056
- ): void;
3329
+ startCallback(callback?: ((err?: Error) => void) | undefined): void;
3057
3330
  /**
3058
3331
  * @returns {Promise<void>}
3059
3332
  */
@@ -3061,25 +3334,19 @@ declare class Server {
3061
3334
  /**
3062
3335
  * @param {(err?: Error) => void} [callback]
3063
3336
  */
3064
- stopCallback(
3065
- callback?: ((err?: Error | undefined) => void) | undefined
3066
- ): void;
3337
+ stopCallback(callback?: ((err?: Error) => void) | undefined): void;
3067
3338
  /**
3068
3339
  * @param {Port} port
3069
3340
  * @param {Host} hostname
3070
3341
  * @param {(err?: Error) => void} fn
3071
3342
  * @returns {void}
3072
3343
  */
3073
- listen(
3074
- port: Port,
3075
- hostname: Host,
3076
- fn: (err?: Error | undefined) => void
3077
- ): void;
3344
+ listen(port: Port, hostname: Host, fn: (err?: Error) => void): void;
3078
3345
  /**
3079
3346
  * @param {(err?: Error) => void} [callback]
3080
3347
  * @returns {void}
3081
3348
  */
3082
- close(callback?: ((err?: Error | undefined) => void) | undefined): void;
3349
+ close(callback?: ((err?: Error) => void) | undefined): void;
3083
3350
  }
3084
3351
  declare namespace Server {
3085
3352
  export {
@@ -3098,7 +3365,6 @@ declare namespace Server {
3098
3365
  NextFunction,
3099
3366
  ExpressRequestHandler,
3100
3367
  ExpressErrorRequestHandler,
3101
- AnymatchMatcher,
3102
3368
  WatchOptions,
3103
3369
  FSWatcher,
3104
3370
  ConnectHistoryApiFallbackOptions,
@@ -3237,7 +3503,6 @@ type Response = import("express").Response;
3237
3503
  type NextFunction = import("express").NextFunction;
3238
3504
  type ExpressRequestHandler = import("express").RequestHandler;
3239
3505
  type ExpressErrorRequestHandler = import("express").ErrorRequestHandler;
3240
- type AnymatchMatcher = import("anymatch").Matcher;
3241
3506
  type WatchOptions = import("chokidar").WatchOptions;
3242
3507
  type ConnectHistoryApiFallbackOptions =
3243
3508
  import("connect-history-api-fallback").Options;
@@ -3270,7 +3535,7 @@ type WatchFiles = {
3270
3535
  options?:
3271
3536
  | (import("chokidar").WatchOptions & {
3272
3537
  aggregateTimeout?: number | undefined;
3273
- ignored?: string[] | import("anymatch").Matcher | undefined;
3538
+ ignored?: WatchOptions["ignored"];
3274
3539
  poll?: number | boolean | undefined;
3275
3540
  })
3276
3541
  | undefined;
@@ -3286,7 +3551,7 @@ type Static = {
3286
3551
  | boolean
3287
3552
  | (import("chokidar").WatchOptions & {
3288
3553
  aggregateTimeout?: number | undefined;
3289
- ignored?: string[] | import("anymatch").Matcher | undefined;
3554
+ ignored?: WatchOptions["ignored"];
3290
3555
  poll?: number | boolean | undefined;
3291
3556
  })
3292
3557
  | undefined;