假设您有以下内容:
var someFunc = function() {
// do something here with arguments
}
Run Code Online (Sandbox Code Playgroud)
您如何正确地记录此函数可以在JSDoc中获取任意数量的参数?这是我最好的猜测,但我不确定它是否正确.
/**
* @param {Mixed} [...] Unlimited amount of optional parameters
*/
var someFunc = function() {
// do something here with arguments
}
Run Code Online (Sandbox Code Playgroud)