jsdoc-vuejs icon indicating copy to clipboard operation
jsdoc-vuejs copied to clipboard

Helper functions with jsdoc blocks are not output in the documentation

Open brandoncordell opened this issue 5 years ago • 3 comments

In the example you have a jsdoc block over a helper function (not a vuejs event). Is that documentation supposed to be generated? The only thing generated for me is what is marked as a @vue-event but I often have functions in methods: that I wouldn't classify as an event.

Here are the jsdoc package versions I have installed.

    ...
    "jsdoc": "^3.6.3",
    "jsdoc-export-default-interop": "^0.3.1",
    "jsdoc-vuejs": "^3.0.4",
    "jsdoc-vuex-plugin": "^1.0.0",
    ...

brandoncordell avatar Nov 07 '19 16:11 brandoncordell

@vue-event is used to document events emitted by the component with this.$emit('my-event').

Functions in methods are parsed normally by JSDoc, they should not by documented as events.

Kocal avatar Nov 09 '19 12:11 Kocal

@Kocal Thank you. Therein lies my problem. Inside of .vue files the only thing parsed and added to the documentation are @vue-* tags. No other documentation is generated (e.g. a normal jsdoc method).

brandoncordell avatar Nov 09 '19 18:11 brandoncordell

Inside Vue file, in Methods section, I only use /** *Description of myFunction *@param {Type} paramX - param description */ myFunction(paramX){ .... }

Instead of using @function, i got my methods well parsed by just giving them a description. The vuejs plugin recognizes and uses the name of each method (defined in code) and that is what i see on html doc.

PeterCaballero avatar Feb 03 '21 20:02 PeterCaballero