carto.js/config/jsdoc/plugins/api.js
2020-06-13 18:34:34 +08:00

27 lines
519 B
JavaScript

/**
* Define @api tag
*/
exports.defineTags = function (dictionary) {
dictionary.defineTag('api', {
mustHaveValue: false,
canHaveType: false,
canHaveName: false,
onTagged: function (doclet, tag) {
doclet.public = true;
}
});
};
/*
* Only items with @api annotation should be documented
*/
exports.handlers = {
parseComplete: function (e) {
var doclets = e.doclets;
for (var i = 0; i < doclets.length; i++) {
doclets[i].undocumented = !doclets[i].public;
}
}
};