@@ -153,9 +153,6 @@ declare class Server {
153
153
/**
154
154
* @typedef {(ProxyConfigArrayItem | ((req?: Request | undefined, res?: Response | undefined, next?: NextFunction | undefined) => ProxyConfigArrayItem))[] } ProxyConfigArray
155
155
*/
156
- /**
157
- * @typedef {{ [url: string]: string | ProxyConfigArrayItem } } ProxyConfigMap
158
- */
159
156
/**
160
157
* @typedef {Object } OpenApp
161
158
* @property {string } [name]
@@ -216,7 +213,7 @@ declare class Server {
216
213
* @property {boolean } [http2]
217
214
* @property {"http" | "https" | "spdy" | string | ServerConfiguration } [server]
218
215
* @property {boolean | "sockjs" | "ws" | string | WebSocketServerConfiguration } [webSocketServer]
219
- * @property {ProxyConfigMap | ProxyConfigArrayItem | ProxyConfigArray } [proxy]
216
+ * @property {ProxyConfigArray } [proxy]
220
217
* @property {boolean | string | Open | Array<string | Open> } [open]
221
218
* @property {boolean } [setupExitSignals]
222
219
* @property {boolean | ClientConfiguration } [client]
@@ -323,69 +320,6 @@ declare class Server {
323
320
) [ ] ;
324
321
} ;
325
322
trustedTypesPolicyName : {
326
- /**
327
- * @typedef {Object } Open
328
- * @property {string | string[] | OpenApp } [app]
329
- * @property {string | string[] } [target]
330
- */
331
- /**
332
- * @typedef {Object } NormalizedOpen
333
- * @property {string } target
334
- * @property {import("open").Options } options
335
- */
336
- /**
337
- * @typedef {Object } WebSocketURL
338
- * @property {string } [hostname]
339
- * @property {string } [password]
340
- * @property {string } [pathname]
341
- * @property {number | string } [port]
342
- * @property {string } [protocol]
343
- * @property {string } [username]
344
- */
345
- /**
346
- * @typedef {boolean | ((error: Error) => void) } OverlayMessageOptions
347
- */
348
- /**
349
- * @typedef {Object } ClientConfiguration
350
- * @property {"log" | "info" | "warn" | "error" | "none" | "verbose" } [logging]
351
- * @property {boolean | { warnings?: OverlayMessageOptions, errors?: OverlayMessageOptions, runtimeErrors?: OverlayMessageOptions } } [overlay]
352
- * @property {boolean } [progress]
353
- * @property {boolean | number } [reconnect]
354
- * @property {"ws" | "sockjs" | string } [webSocketTransport]
355
- * @property {string | WebSocketURL } [webSocketURL]
356
- */
357
- /**
358
- * @typedef {Array<{ key: string; value: string }> | Record<string, string | string[]> } Headers
359
- */
360
- /**
361
- * @typedef {{ name?: string, path?: string, middleware: ExpressRequestHandler | ExpressErrorRequestHandler } | ExpressRequestHandler | ExpressErrorRequestHandler } Middleware
362
- */
363
- /**
364
- * @typedef {Object } Configuration
365
- * @property {boolean | string } [ipc]
366
- * @property {Host } [host]
367
- * @property {Port } [port]
368
- * @property {boolean | "only" } [hot]
369
- * @property {boolean } [liveReload]
370
- * @property {DevMiddlewareOptions<Request, Response> } [devMiddleware]
371
- * @property {boolean } [compress]
372
- * @property {"auto" | "all" | string | string[] } [allowedHosts]
373
- * @property {boolean | ConnectHistoryApiFallbackOptions } [historyApiFallback]
374
- * @property {boolean | Record<string, never> | BonjourOptions } [bonjour]
375
- * @property {string | string[] | WatchFiles | Array<string | WatchFiles> } [watchFiles]
376
- * @property {boolean | string | Static | Array<string | Static> } [static]
377
- * @property {boolean | ServerOptions } [https]
378
- * @property {boolean } [http2]
379
- * @property {"http" | "https" | "spdy" | string | ServerConfiguration } [server]
380
- * @property {boolean | "sockjs" | "ws" | string | WebSocketServerConfiguration } [webSocketServer]
381
- * @property {ProxyConfigMap | ProxyConfigArrayItem | ProxyConfigArray } [proxy]
382
- * @property {boolean | string | Open | Array<string | Open> } [open]
383
- * @property {boolean } [setupExitSignals]
384
- * @property {boolean | ClientConfiguration } [client]
385
- * @property {Headers | ((req: Request, res: Response, context: DevMiddlewareContext<Request, Response>) => Headers) } [headers]
386
- * @property {(devServer: Server) => void } [onListening]
387
- * @property {(middlewares: Middleware[], devServer: Server) => Middleware[] } [setupMiddlewares]
388
- */
389
323
description : string ;
390
324
type : string ;
391
325
} ;
@@ -423,6 +357,35 @@ declare class Server {
423
357
) [ ] ;
424
358
} ;
425
359
ClientWebSocketTransport : {
360
+ /**
361
+ * @typedef {{ name?: string, path?: string, middleware: ExpressRequestHandler | ExpressErrorRequestHandler } | ExpressRequestHandler | ExpressErrorRequestHandler } Middleware
362
+ */
363
+ /**
364
+ * @typedef {Object } Configuration
365
+ * @property {boolean | string } [ipc]
366
+ * @property {Host } [host]
367
+ * @property {Port } [port]
368
+ * @property {boolean | "only" } [hot]
369
+ * @property {boolean } [liveReload]
370
+ * @property {DevMiddlewareOptions<Request, Response> } [devMiddleware]
371
+ * @property {boolean } [compress]
372
+ * @property {"auto" | "all" | string | string[] } [allowedHosts]
373
+ * @property {boolean | ConnectHistoryApiFallbackOptions } [historyApiFallback]
374
+ * @property {boolean | Record<string, never> | BonjourOptions } [bonjour]
375
+ * @property {string | string[] | WatchFiles | Array<string | WatchFiles> } [watchFiles]
376
+ * @property {boolean | string | Static | Array<string | Static> } [static]
377
+ * @property {boolean | ServerOptions } [https]
378
+ * @property {boolean } [http2]
379
+ * @property {"http" | "https" | "spdy" | string | ServerConfiguration } [server]
380
+ * @property {boolean | "sockjs" | "ws" | string | WebSocketServerConfiguration } [webSocketServer]
381
+ * @property {ProxyConfigArray } [proxy]
382
+ * @property {boolean | string | Open | Array<string | Open> } [open]
383
+ * @property {boolean } [setupExitSignals]
384
+ * @property {boolean | ClientConfiguration } [client]
385
+ * @property {Headers | ((req: Request, res: Response, context: DevMiddlewareContext<Request, Response>) => Headers) } [headers]
386
+ * @property {(devServer: Server) => void } [onListening]
387
+ * @property {(middlewares: Middleware[], devServer: Server) => Middleware[] } [setupMiddlewares]
388
+ */
426
389
anyOf : {
427
390
$ref : string ;
428
391
} [ ] ;
@@ -516,6 +479,9 @@ declare class Server {
516
479
} ;
517
480
HeaderObject : {
518
481
type : string ;
482
+ /**
483
+ * @type {FSWatcher[] }
484
+ */
519
485
additionalProperties : boolean ;
520
486
properties : {
521
487
key : {
@@ -539,9 +505,6 @@ declare class Server {
539
505
$ref : string ;
540
506
} ;
541
507
minItems : number ;
542
- /**
543
- * @type {Socket[] }
544
- */
545
508
instanceof ?: undefined ;
546
509
}
547
510
| {
@@ -641,11 +604,6 @@ declare class Server {
641
604
OnListening : {
642
605
instanceof : string ;
643
606
description : string ;
644
- /**
645
- * @param {Port } port
646
- * @param {string } host
647
- * @returns {Promise<number | string> }
648
- */
649
607
link : string ;
650
608
} ;
651
609
Open : {
@@ -773,19 +731,20 @@ declare class Server {
773
731
}
774
732
) [ ] ;
775
733
description : string ;
776
- link : string ;
734
+ link : string /** @type { WebSocketURL } */ ;
777
735
} ;
778
736
Proxy : {
779
737
type : string ;
780
738
items : {
781
739
anyOf : (
782
740
| {
783
741
type : string ;
784
- /** @type { WebSocketURL } */ instanceof ?: undefined ;
742
+ instanceof ?: undefined ;
785
743
}
786
744
| {
787
745
instanceof : string ;
788
- /** @type {ClientConfiguration } */ type ?: undefined ;
746
+ /** @type {{ type: WebSocketServerConfiguration["type"], options: NonNullable<WebSocketServerConfiguration["options"]> } } */
747
+ type ?: undefined ;
789
748
}
790
749
) [ ] ;
791
750
} ;
@@ -811,6 +770,7 @@ declare class Server {
811
770
ServerString : {
812
771
type : string ;
813
772
minLength : number ;
773
+ /** @type {string } */
814
774
cli : {
815
775
exclude : boolean ;
816
776
} ;
@@ -1190,7 +1150,7 @@ declare class Server {
1190
1150
} ;
1191
1151
WatchFilesString : {
1192
1152
type : string ;
1193
- /** @type { NormalizedStatic } */ minLength : number ;
1153
+ minLength : number ;
1194
1154
} ;
1195
1155
WebSocketServer : {
1196
1156
anyOf : {
@@ -1652,7 +1612,6 @@ declare namespace Server {
1652
1612
ByPass ,
1653
1613
ProxyConfigArrayItem ,
1654
1614
ProxyConfigArray ,
1655
- ProxyConfigMap ,
1656
1615
OpenApp ,
1657
1616
Open ,
1658
1617
NormalizedOpen ,
@@ -1810,9 +1769,6 @@ type ProxyConfigArray = (
1810
1769
next ?: NextFunction | undefined ,
1811
1770
) => ProxyConfigArrayItem )
1812
1771
) [ ] ;
1813
- type ProxyConfigMap = {
1814
- [ url : string ] : string | ProxyConfigArrayItem ;
1815
- } ;
1816
1772
type OpenApp = {
1817
1773
name ?: string | undefined ;
1818
1774
arguments ?: string [ ] | undefined ;
@@ -1903,7 +1859,7 @@ type Configuration = {
1903
1859
http2 ?: boolean | undefined ;
1904
1860
server ?: string | ServerConfiguration | undefined ;
1905
1861
webSocketServer ?: string | boolean | WebSocketServerConfiguration | undefined ;
1906
- proxy ?: ProxyConfigArrayItem | ProxyConfigMap | ProxyConfigArray | undefined ;
1862
+ proxy ?: ProxyConfigArray | undefined ;
1907
1863
open ?: string | boolean | Open | ( string | Open ) [ ] | undefined ;
1908
1864
setupExitSignals ?: boolean | undefined ;
1909
1865
client ?: boolean | ClientConfiguration | undefined ;
0 commit comments