Skip to content

Commit 1574a53

Browse files
committed
fix: types
1 parent 8030912 commit 1574a53

File tree

2 files changed

+22
-27
lines changed

2 files changed

+22
-27
lines changed

lib/Server.js

Lines changed: 1 addition & 1 deletion
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"]} watchOptions
758+
* @param {WatchOptions & WebpackConfiguration["watchOptions"] & { aggregateTimeout?: number, ignored?: AnymatchMatcher | string[], poll?: number | boolean }} watchOptions
759759
* @returns {WatchOptions}
760760
*/
761761
const getWatchOptions = (watchOptions = {}) => {

types/lib/Server.d.ts

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -978,6 +978,9 @@ declare class Server {
978978
description: string;
979979
multiple: boolean;
980980
path: string;
981+
/**
982+
* @type {string | undefined}
983+
*/
981984
type: string;
982985
}[];
983986
description: string;
@@ -1011,7 +1014,7 @@ declare class Server {
10111014
type: string;
10121015
multiple: boolean;
10131016
description: string;
1014-
path: string;
1017+
path: string /** @type {ClientConfiguration} */;
10151018
}[];
10161019
description: string;
10171020
simpleType: string;
@@ -1032,7 +1035,7 @@ declare class Server {
10321035
configs: {
10331036
description: string;
10341037
multiple: boolean;
1035-
/** @type {string} */ path: string;
1038+
path: string;
10361039
type: string;
10371040
}[];
10381041
description: string;
@@ -1053,7 +1056,7 @@ declare class Server {
10531056
"https-key": {
10541057
configs: {
10551058
type: string;
1056-
multiple: boolean;
1059+
/** @type {number | string} */ multiple: boolean;
10571060
description: string;
10581061
path: string;
10591062
}[];
@@ -1142,8 +1145,9 @@ declare class Server {
11421145
type: string;
11431146
multiple: boolean;
11441147
description: string;
1145-
path: string /** @type {Object<string,string>} */;
1148+
path: string;
11461149
}[];
1150+
/** @type {Object<string,string>} */
11471151
description: string;
11481152
negatedDescription: string;
11491153
simpleType: string;
@@ -1152,24 +1156,19 @@ declare class Server {
11521156
"magic-html": {
11531157
configs: {
11541158
type: string;
1155-
/** @type {any} */
11561159
multiple: boolean;
11571160
description: string;
11581161
path: string;
11591162
}[];
11601163
description: string;
11611164
negatedDescription: string;
11621165
simpleType: string;
1163-
/** @type {string} */ multiple: boolean;
1166+
multiple: boolean /** @type {string} */;
11641167
};
11651168
open: {
11661169
configs: {
11671170
type: string;
11681171
multiple: boolean;
1169-
/**
1170-
* @private
1171-
* @returns {Compiler["options"]}
1172-
*/
11731172
description: string;
11741173
path: string;
11751174
}[];
@@ -1197,7 +1196,7 @@ declare class Server {
11971196
path: string;
11981197
}[];
11991198
description: string;
1200-
/** @type {Compiler} */ simpleType: string;
1199+
simpleType: string;
12011200
multiple: boolean;
12021201
};
12031202
"open-app-name-reset": {
@@ -1256,7 +1255,7 @@ declare class Server {
12561255
| {
12571256
type: string;
12581257
values: string[];
1259-
/** @type {NormalizedStatic} */ multiple: boolean;
1258+
multiple: boolean;
12601259
description: string;
12611260
path: string;
12621261
}
@@ -1432,6 +1431,7 @@ declare class Server {
14321431
simpleType: string;
14331432
};
14341433
static: {
1434+
/** @type {ServerOptions} */
14351435
configs: {
14361436
type: string;
14371437
multiple: boolean;
@@ -1458,7 +1458,6 @@ declare class Server {
14581458
type: string;
14591459
multiple: boolean;
14601460
description: string;
1461-
/** @type {ServerOptions} */
14621461
path: string;
14631462
}[];
14641463
description: string;
@@ -1480,7 +1479,7 @@ declare class Server {
14801479
configs: {
14811480
type: string;
14821481
multiple: boolean;
1483-
/** @type {ServerOptions} */ description: string;
1482+
description: string;
14841483
path: string;
14851484
}[];
14861485
description: string;
@@ -2682,7 +2681,6 @@ declare class Server {
26822681
OpenBoolean: {
26832682
type: string;
26842683
};
2685-
/** @type {number | string} */
26862684
OpenObject: {
26872685
type: string;
26882686
additionalProperties: boolean;
@@ -2727,7 +2725,6 @@ declare class Server {
27272725
}
27282726
)[];
27292727
};
2730-
/** @type {string} */
27312728
arguments: {
27322729
items: {
27332730
type: string;
@@ -2879,7 +2876,7 @@ declare class Server {
28792876
instanceof?: undefined;
28802877
}
28812878
| {
2882-
instanceof: string;
2879+
/** @type {string} */ instanceof: string;
28832880
type?: undefined;
28842881
items?: undefined;
28852882
}
@@ -2920,7 +2917,6 @@ declare class Server {
29202917
cert: {
29212918
anyOf: (
29222919
| {
2923-
/** @type {MultiCompiler} */
29242920
type: string;
29252921
items: {
29262922
anyOf: (
@@ -3069,7 +3065,7 @@ declare class Server {
30693065
SetupMiddlewares: {
30703066
instanceof: string;
30713067
description: string;
3072-
link: string /** @type {NormalizedStatic} */;
3068+
link: string;
30733069
};
30743070
Static: {
30753071
anyOf: (
@@ -3313,13 +3309,13 @@ declare class Server {
33133309
$ref: string;
33143310
};
33153311
magicHtml: {
3316-
$ref: string /** @type {ServerOptions} */;
3312+
$ref: string;
33173313
};
33183314
onAfterSetupMiddleware: {
3319-
$ref: string /** @type {ServerOptions} */;
3315+
$ref: string;
33203316
};
33213317
onBeforeSetupMiddleware: {
3322-
$ref: string;
3318+
$ref: string /** @type {ServerOptions} */;
33233319
};
33243320
onListening: {
33253321
$ref: string;
@@ -3331,15 +3327,14 @@ declare class Server {
33313327
$ref: string;
33323328
};
33333329
proxy: {
3334-
$ref: string;
3330+
$ref: string /** @type {ServerOptions} */;
33353331
};
33363332
server: {
33373333
$ref: string;
33383334
};
33393335
setupExitSignals: {
33403336
$ref: string;
33413337
};
3342-
/** @type {Array<keyof ServerOptions>} */
33433338
setupMiddlewares: {
33443339
$ref: string;
33453340
};
@@ -3350,8 +3345,8 @@ declare class Server {
33503345
$ref: string;
33513346
};
33523347
webSocketServer: {
3353-
$ref: string;
3354-
};
3348+
$ref: string /** @type {ServerOptions} */;
3349+
} /** @type {ServerOptions} */;
33553350
};
33563351
};
33573352
/**

0 commit comments

Comments
 (0)