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

Breaks standard documentation for mixins

Open turboteddy opened this issue 6 years ago • 3 comments

Thanks for the good work. I'm not sure why, but when I try to documents methods of a mixin, these aren't displayed:


/**
 * Description 
 * @mixin   mixins/somename
 * @vue-computed {*}           comp1              DOCUMENT ME!
 * @vue-computed {*}           comp2              DOCUMENT ME!
 */
export default {

  computed: {
    ...mapGetters([
      'comp1',
      'comp2'
    ])
  },

  methods: {

    /**
     * DOCUMENT ME!
     *
     * @function foo
     * @memberof mixins/somename
     * @instance
     *
     * @param a
     * @param b=null
     * @returns {*}
     */
    foo(a,b=null) {
        //....
    }
  }
};

Also tried with...

/**
 * Description
 * @module  mixins/somename
 * @mixin
 * @vue-computed {*}           comp1              DOCUMENT ME!
 * @vue-computed {*}           comp2              DOCUMENT ME!
 */

If I drop the vue-tags, it works (i.e. the function foo is shown in output).

Is this a bug, or did I misunderstand something (must admit that I'm very new to Vue)? It works if I drop the @mixin tag, but then it's no longer labelled as a mixin.

turboteddy avatar Jan 10 '19 16:01 turboteddy

Hi, I think it's because of this line but I'm not sure. :thinking:

Maybe if we can check if e.doclet is a mixin, then we can update e.doclet.kind and e.doclet.longname with good values, not sure if it will work :confused:

Kocal avatar Jan 10 '19 17:01 Kocal

Thanks for quick reply, @Kocal ! Please see "experimental suggestion", along with comments

turboteddy avatar Jan 11 '19 13:01 turboteddy

Thanks for the contrib, I will see when I can have some free time to review it! :slightly_smiling_face:

Kocal avatar Jan 11 '19 18:01 Kocal