更新时间:2023-12-02 23:40:16
另一种方法是使用typedef:
Another way to do it would be to use a typedef:
/**
* @typedef {{
* issues: number,
* source: string
* }}
*/
var WorldPeaceOptions;
/**
* @constructor
* @param {WorldPeaceOptions} defaults
*/
var WorldPeace = function (defaults) {
// code here
};