1

根据我对 JSDoc 中命名继承的理解,这应该可以定义@name User.format#name,但不能

/**
 * @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
    }
};
4

0 回答 0