File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -338,7 +338,7 @@ const pluginName = "webpack-dev-server";
338338class Server {
339339 /**
340340 * @param {Configuration<A, S> } options options
341- * @param {Compiler | MultiCompiler } compiler compiler
341+ * @param {( Compiler | MultiCompiler)= } compiler compiler, omitted when the server is used as a plugin via `apply()`
342342 */
343343 constructor ( options , compiler ) {
344344 validate ( /** @type {Schema } */ ( schema ) , options , {
@@ -593,7 +593,7 @@ class Server {
593593 // client. `target: false` is `null` everywhere, so it is excluded.
594594 return Boolean (
595595 platform . web ||
596- platform ?. universal ||
596+ /** @type { { universal?: boolean | null } } */ ( platform ) ?. universal ||
597597 ( compiler . options . target !== false &&
598598 platform . web === null &&
599599 platform . node === null ) ,
Original file line number Diff line number Diff line change @@ -1496,9 +1496,12 @@ declare class Server<
14961496 private static isWebTarget ;
14971497 /**
14981498 * @param {Configuration<A, S> } options options
1499- * @param {Compiler | MultiCompiler } compiler compiler
1499+ * @param {( Compiler | MultiCompiler)= } compiler compiler, omitted when the server is used as a plugin via `apply()`
15001500 */
1501- constructor ( options : Configuration < A , S > , compiler : Compiler | MultiCompiler ) ;
1501+ constructor (
1502+ options : Configuration < A , S > ,
1503+ compiler ?: ( Compiler | MultiCompiler ) | undefined ,
1504+ ) ;
15021505 compiler :
15031506 | import ( "webpack" ) . Compiler
15041507 | import ( "webpack" ) . MultiCompiler
You can’t perform that action at this time.
0 commit comments