如何在Meteor应用程序中正确使用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')
}
});