[英]Using @param for an object that is being passed through a function
Basically, what I need to do is use @param for an object that is being passed through to a function.基本上,我需要做的是将@param 用于正在传递给 function 的 object。
/** @param {String} b */
function Hello(a, { b, c }) {
}
I thought it would work something like this, but it doesn't.我认为它会像这样工作,但事实并非如此。
How would I use @param on b, and c?我将如何在 b 和 c 上使用 @param?
So I've figured it out!所以我想通了!
/**
* @param {object} param0
* @param {Number} param0.a
*/
async function hello({ a }) {
}
https://jsdoc.app/tags-param.html https://jsdoc.app/tags-param.html
You can read the documentation here as well!您也可以在此处阅读文档!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.