4
什麼是流星應用程序中使用JSDoc正確的方法是什麼? 下面是我編寫代碼的方法,但所有部分之間沒有「連接」。 所有內容都屬於示例模板,所以jsdoc的輸出結構應該正確。如何使用jsdoc爲流星應用
如何改善這個文件?
Template.example.helpers({
/**
* Get all categories
* @name categories
* @return {Cursor}
* @summary Cursor categories
*/
categories() {
return Categories.find({});
},
});
Template.example.onCreated(
/**
* If template is created (still not rendered), ReactiveDict variable is initialized
* @function
* @name onCreated
* @summary Set ReactiveDict
*/
function() {
this.something = new ReactiveDict();
}
);
Template.example.events({
/**
* Clicking on category will show a console message
* @event
* @summary Console message
*/
'click #category': (event, template) => {
console.log('nice')
}
});
您能否給我舉個示例代碼?我不知道我應該用什麼'isTemplate',我應該如何紀念'events' ... – user3142695
我編輯它,讓我知道它是否適合。 – ko0stik