我想爲使用YUIDoc的JavaScript方法編寫一些文檔。它看起來像:如何記錄一個方法的「對象」參數
/**
Returns an instance of className
@method getInstance
@param {string} className the of the class used to create the instance
@param {Object} options these are options used to create the instance
**/
function getInstance(className, options) { ..... }
現在,選擇對象可以有幾個參數,如options.id
,options.single
等
如何將此信息添加到這個@param
的文檔?
谷歌關閉編譯器將標誌着,最多爲{{ID:字符串,單:無論}}或{對象<字符串,字符串>}如果它是一個普通的字典,但我不知道這是不是通用語法或對其的擴展。看到這個頁面的底部:https://developers.google.com/closure/compiler/docs/js-for-compiler – Dave 2013-03-13 21:30:27