How to make link of method parameter type in jsDoc

2019-06-22 18:16发布

Is there any natural way or special tag to make parameter type as link? enter image description here

/**
* My js app
* @module app
*/
/** 
* Namespace for MYAPP classes and functions.
* @namespace HUMAN_RESOURCE
*/
var HUMAN_RESOURCE = HUMAN_RESOURCE || {};

/**
* @class JustClass
* @constructor
*/
HUMAN_RESOURCE.JustClass = function(){ }

/**
* Constructs Person objects
* @class Person
* @constructor
* @param {String} First name
* @param {String} Last name
*/
HUMAN_RESOURCE.Person = function (first, last) {    
    /**
    * First name of the Person
    * @property first_name
    * @type String
    */
    this.first_name = first;

    /**
    * @property f_createPerson
    * @param {Person} [_person] açıklama
    * @return {Person} Person type object
    */
    this.f_createPerson = function(_person, _person2){ return new Person() }
};

/**
* Return Person's full name
* @alias getName
* @memberof! HUMAN_RESOURCE.Person#
* @return {String} First name + last name
*/
HUMAN_RESOURCE.Person.prototype.getName = function () {
    return this.first_name + ' ' + this.last_name;
};

标签: jsdoc
1条回答
\"骚年 ilove
2楼-- · 2019-06-22 18:39

Fortunately yes, it is just not always obvious what the correct name path is (but you can basically see it at the top of your generated docs)

/**
* @property f_createPerson
* @param {module:app~HUMAN_RESOURCE.Person} [_person] açıklama
* @return {module:app~HUMAN_RESOURCE.Person} Person type object
*/
this.f_createPerson = function(_person, _person2){ return new Person() }
查看更多
登录 后发表回答