@@ -27,10 +27,14 @@ const noop = () => {};
2727/** @typedef {import("http").IncomingMessage } IncomingMessage */
2828/** @typedef {import("http").ServerResponse & ExtendedServerResponse } ServerResponse */
2929
30- // eslint-disable-next-line jsdoc/no-restricted-syntax
30+ // eslint-disable-next-line jsdoc/reject-any-type
31+ /** @typedef {any } EXPECTED_ANY */
32+ // eslint-disable-next-line jsdoc/reject-function-type
33+ /** @typedef {Function } EXPECTED_FUNCTION */
34+
3135/**
3236 * @callback NextFunction
33- * @param {any = } err error
37+ * @param {EXPECTED_ANY = } err error
3438 * @returns {void }
3539 */
3640
@@ -386,21 +390,19 @@ function hapiWrapper() {
386390
387391wdm . hapiWrapper = hapiWrapper ;
388392
389- // eslint-disable-next-line jsdoc/no-restricted-syntax
390393/**
391394 * @template {IncomingMessage} [RequestInternal=IncomingMessage]
392395 * @template {ServerResponse} [ResponseInternal=ServerResponse]
393396 * @param {Compiler | MultiCompiler } compiler compiler
394397 * @param {Options<RequestInternal, ResponseInternal>= } options options
395- * @returns {(ctx: any , next: Function ) => Promise<void> | void } kow wrapper
398+ * @returns {(ctx: EXPECTED_ANY , next: EXPECTED_FUNCTION ) => Promise<void> | void } kow wrapper
396399 */
397400function koaWrapper ( compiler , options ) {
398401 const devMiddleware = wdm ( compiler , options ) ;
399402
400- // eslint-disable-next-line jsdoc/no-restricted-syntax
401403 /**
402404 * @param {{req: RequestInternal, res: ResponseInternal & import("./utils/compatibleAPI").ExpectedServerResponse, status: number, body: string | Buffer | import("fs").ReadStream | {message: string}, state: object} } ctx context
403- * @param {Function } next next
405+ * @param {EXPECTED_FUNCTION } next next
404406 * @returns {Promise<void> }
405407 */
406408 async function webpackDevMiddleware ( ctx , next ) {
@@ -501,21 +503,19 @@ function koaWrapper(compiler, options) {
501503
502504wdm . koaWrapper = koaWrapper ;
503505
504- // eslint-disable-next-line jsdoc/no-restricted-syntax
505506/**
506507 * @template {IncomingMessage} [RequestInternal=IncomingMessage]
507508 * @template {ServerResponse} [ResponseInternal=ServerResponse]
508509 * @param {Compiler | MultiCompiler } compiler compiler
509510 * @param {Options<RequestInternal, ResponseInternal>= } options options
510- * @returns {(ctx: any , next: Function ) => Promise<void> | void } hono wrapper
511+ * @returns {(ctx: EXPECTED_ANY , next: EXPECTED_FUNCTION ) => Promise<void> | void } hono wrapper
511512 */
512513function honoWrapper ( compiler , options ) {
513514 const devMiddleware = wdm ( compiler , options ) ;
514515
515- // eslint-disable-next-line jsdoc/no-restricted-syntax
516516 /**
517- * @param {{ env: any , body: any , json: any , status: any , set: any , req: RequestInternal & import("./utils/compatibleAPI").ExpectedIncomingMessage & { header: (name: string) => string }, res: ResponseInternal & import("./utils/compatibleAPI").ExpectedServerResponse & { headers: any , status: any } } } context context
518- * @param {Function } next next function
517+ * @param {{ env: EXPECTED_ANY , body: EXPECTED_ANY , json: EXPECTED_ANY , status: EXPECTED_ANY , set: EXPECTED_ANY , req: RequestInternal & import("./utils/compatibleAPI").ExpectedIncomingMessage & { header: (name: string) => string }, res: ResponseInternal & import("./utils/compatibleAPI").ExpectedServerResponse & { headers: EXPECTED_ANY , status: EXPECTED_ANY } } } context context
518+ * @param {EXPECTED_FUNCTION } next next function
519519 * @returns {Promise<void> }
520520 */
521521 async function webpackDevMiddleware ( context , next ) {
@@ -559,11 +559,10 @@ function honoWrapper(compiler, options) {
559559 */
560560 res . getHeader = ( name ) => context . res . headers . get ( name ) ;
561561
562- // eslint-disable-next-line jsdoc/no-restricted-syntax
563562 /**
564563 * @param {string } name header name
565564 * @param {string | number | Readonly<string[]> } value value
566- * @returns {ResponseInternal & import("./utils/compatibleAPI").ExpectedServerResponse & { headers: any , status: any } } response
565+ * @returns {ResponseInternal & import("./utils/compatibleAPI").ExpectedServerResponse & { headers: EXPECTED_ANY , status: EXPECTED_ANY } } response
567566 */
568567 res . setHeader = ( name , value ) => {
569568 context . res . headers . append ( name , value ) ;
0 commit comments