Skip to content

Conversation

turboteddy
Copy link

@turboteddy turboteddy commented Jan 11, 2019

Based on comment by @Kocal , I experimented a little bit. I have now knowledge of the inner workings of jsDoc, so this is just a "nudge to look in the right direction".

Works with code like this

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

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

  methods: {

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

...and corresponding module that uses this mixin:

/**
 * Description 
* @module components/someModule
 * @mixies   someMixin
 * @vue-computed {*}           comp3              DOCUMENT ME!
 * @vue-computed {*}           comp4              DOCUMENT ME!
 */
export default {
  name: 'someModuleName',
  mixins: [LanguageKeysMixin]
  // ....
};

However, this hack needs to be improved upon, because...

  • Only mixins with componentName ending with "Mixin" work
  • name of mixin cannot be prefixed with "something/"

Also, it would be nice to have the members that have been mixed into module components/someModule to be displayed for that module.

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

Successfully merging this pull request may close these issues.

1 participant