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