Skip to content

Commit 13ede7e

Browse files
committed
fix: types
1 parent 90c8795 commit 13ede7e

File tree

2 files changed

+21
-18
lines changed

2 files changed

+21
-18
lines changed

lib/Server.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ class Server {
755755
// TODO remove `{}` after drop webpack v4 support
756756
const compilerWatchOptions = compilerOptions.watchOptions || {};
757757
/**
758-
* @param {WatchOptions & WebpackConfiguration["watchOptions"] & { aggregateTimeout?: number, ignored?: AnymatchMatcher | string[], poll?: number | boolean }} watchOptions
758+
* @param {WatchOptions & { aggregateTimeout?: number, ignored?: AnymatchMatcher | string[], poll?: number | boolean }} watchOptions
759759
* @returns {WatchOptions}
760760
*/
761761
const getWatchOptions = (watchOptions = {}) => {

types/lib/Server.d.ts

+20-17
Original file line numberDiff line numberDiff line change
@@ -978,9 +978,6 @@ declare class Server {
978978
description: string;
979979
multiple: boolean;
980980
path: string;
981-
/**
982-
* @type {string | undefined}
983-
*/
984981
type: string;
985982
}[];
986983
description: string;
@@ -1014,7 +1011,7 @@ declare class Server {
10141011
type: string;
10151012
multiple: boolean;
10161013
description: string;
1017-
path: string /** @type {ClientConfiguration} */;
1014+
path: string;
10181015
}[];
10191016
description: string;
10201017
simpleType: string;
@@ -1035,7 +1032,7 @@ declare class Server {
10351032
configs: {
10361033
description: string;
10371034
multiple: boolean;
1038-
path: string;
1035+
/** @type {string} */ path: string;
10391036
type: string;
10401037
}[];
10411038
description: string;
@@ -1056,7 +1053,7 @@ declare class Server {
10561053
"https-key": {
10571054
configs: {
10581055
type: string;
1059-
/** @type {number | string} */ multiple: boolean;
1056+
multiple: boolean;
10601057
description: string;
10611058
path: string;
10621059
}[];
@@ -1145,9 +1142,8 @@ declare class Server {
11451142
type: string;
11461143
multiple: boolean;
11471144
description: string;
1148-
path: string;
1145+
path: string /** @type {Object<string,string>} */;
11491146
}[];
1150-
/** @type {Object<string,string>} */
11511147
description: string;
11521148
negatedDescription: string;
11531149
simpleType: string;
@@ -1156,19 +1152,24 @@ declare class Server {
11561152
"magic-html": {
11571153
configs: {
11581154
type: string;
1155+
/** @type {any} */
11591156
multiple: boolean;
11601157
description: string;
11611158
path: string;
11621159
}[];
11631160
description: string;
11641161
negatedDescription: string;
11651162
simpleType: string;
1166-
multiple: boolean /** @type {string} */;
1163+
/** @type {string} */ multiple: boolean;
11671164
};
11681165
open: {
11691166
configs: {
11701167
type: string;
11711168
multiple: boolean;
1169+
/**
1170+
* @private
1171+
* @returns {Compiler["options"]}
1172+
*/
11721173
description: string;
11731174
path: string;
11741175
}[];
@@ -1196,7 +1197,7 @@ declare class Server {
11961197
path: string;
11971198
}[];
11981199
description: string;
1199-
simpleType: string;
1200+
/** @type {Compiler} */ simpleType: string;
12001201
multiple: boolean;
12011202
};
12021203
"open-app-name-reset": {
@@ -1431,12 +1432,11 @@ declare class Server {
14311432
simpleType: string;
14321433
};
14331434
static: {
1434-
/** @type {ServerOptions} */
14351435
configs: {
14361436
type: string;
14371437
multiple: boolean;
14381438
description: string;
1439-
path: string;
1439+
/** @type {ServerOptions} */ path: string;
14401440
}[];
14411441
description: string;
14421442
simpleType: string;
@@ -2681,6 +2681,7 @@ declare class Server {
26812681
OpenBoolean: {
26822682
type: string;
26832683
};
2684+
/** @type {number | string} */
26842685
OpenObject: {
26852686
type: string;
26862687
additionalProperties: boolean;
@@ -2725,6 +2726,7 @@ declare class Server {
27252726
}
27262727
)[];
27272728
};
2729+
/** @type {string} */
27282730
arguments: {
27292731
items: {
27302732
type: string;
@@ -2876,7 +2878,7 @@ declare class Server {
28762878
instanceof?: undefined;
28772879
}
28782880
| {
2879-
/** @type {string} */ instanceof: string;
2881+
instanceof: string;
28802882
type?: undefined;
28812883
items?: undefined;
28822884
}
@@ -2917,6 +2919,7 @@ declare class Server {
29172919
cert: {
29182920
anyOf: (
29192921
| {
2922+
/** @type {MultiCompiler} */
29202923
type: string;
29212924
items: {
29222925
anyOf: (
@@ -3315,7 +3318,7 @@ declare class Server {
33153318
$ref: string;
33163319
};
33173320
onBeforeSetupMiddleware: {
3318-
$ref: string /** @type {ServerOptions} */;
3321+
$ref: string;
33193322
};
33203323
onListening: {
33213324
$ref: string;
@@ -3327,7 +3330,7 @@ declare class Server {
33273330
$ref: string;
33283331
};
33293332
proxy: {
3330-
$ref: string /** @type {ServerOptions} */;
3333+
$ref: string;
33313334
};
33323335
server: {
33333336
$ref: string;
@@ -3345,8 +3348,8 @@ declare class Server {
33453348
$ref: string;
33463349
};
33473350
webSocketServer: {
3348-
$ref: string /** @type {ServerOptions} */;
3349-
} /** @type {ServerOptions} */;
3351+
$ref: string;
3352+
};
33503353
};
33513354
};
33523355
/**

0 commit comments

Comments
 (0)