I'm trying to document an Express middleware, but the build-in validation tool in WebStorm tells me that types are incorrectly assigned in the following JSDoc block:
/**
* My middleware.
*
* @param {Object} req
* @param {Object} res
* @param {Function} next
* @return {Object}
*/
exports.show = function(req, res, next) {
...
};
In Express sources, I didn't find any @typedef
s to help me. Also, I want to avoid things like @param {*}
.
What is the correct way to document Express middleware using JSDoc? Thanks for any help.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…