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

Feature request: Custom type for props

Open ozum opened this issue 6 years ago • 0 comments

Hi,

Thanks for the project. I have a feature request please.

It would be great if we could provide custom types for props, because some props requires complex objects and documenting them would be great.

Kind Regards,

For example:

  /**
   * @typedef {Object} Currency
   * @property {string}   symbol   - Symbol of the currency
   * @property {string}   name     - Name of the currency
   */

export default {
  props: {
    /**
     * @model
     * @property {string[]}   selected      - Array of ids of selected options.
     * @property {number}     quantity	    - Number of item requested.
     */
    value: {
      type: Object,
      default: () => ({
        selected: [],
        quantity: 1,
      }),
    },
    
    /**
     * Description for the prop
     * @type Currency
     */
    currency: { type: Object, required: true },

    /**
     * Description with Inline type
     * @property {string}    code    - Color code
     * @property {number}    sort    - Sort number of the color
     */
    color: { type: Object, required: true },
  }
}

ozum avatar Nov 29 '18 10:11 ozum