Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaks standard documentation for mixins #169

Open
turboteddy opened this issue Jan 10, 2019 · 3 comments
Open

Breaks standard documentation for mixins #169

turboteddy opened this issue Jan 10, 2019 · 3 comments

Comments

@turboteddy
Copy link

turboteddy commented Jan 10, 2019

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.

@Kocal
Copy link
Owner

Kocal commented Jan 10, 2019

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

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 😕

turboteddy pushed a commit to turboteddy/jsdoc-vuejs that referenced this issue Jan 11, 2019
@turboteddy
Copy link
Author

turboteddy commented Jan 11, 2019

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

@Kocal
Copy link
Owner

Kocal commented Jan 11, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants