JSDoc - How to document methods of a prototype object

654 views Asked by At

Based on my understanding of the naming inheritence in JSDoc, this should work defining @name User.format#name but it does not

/**
 * @class
 * @classdesc Stores the logged in user's information. Handles user updates and includes helper
 * methods for formatting users
 */
User = function() {};

/**
 * Object containing utility methods for formatting user objects
 *
 * @name User.format
 * @property {object}
 */
User.prototype.format = {
    /**
     * returns the full name of a user
     *
     * @name User.format#name
     * @param {User} user
     * @returns {string} the full name
     */
    name: function(user) {
        // some utility function
    }
};
0

There are 0 answers