At the very beginning of my router (Express.js) there are the following lines of code:
"use strict";
let express = require('express');
let router = express.Router();
IntelliJ IDEA returns warning Invalid number of arguments regarding let router = express.Router();.
I checked the official documentation of Express.js (see express.Router), and there is the same line of code.
The IntelliJ IDEA response:
JSDoc defines special syntax for documenting which parameters are optional and IDEA respects this syntax.
The function in express.js is documented here as having a non-optional parameter, while the implementation makes it optional.
Please, have a look if there is a need to synchronize the documentation and implementation.
Details:
https://youtrack.jetbrains.com/issue/WEB-31658