是否有任何自然方式或特殊标记使参数类型成为链接?
/**
* 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;
};
答案 0 :(得分:6)
幸运的是,正确的名称路径并不总是显而易见(但您基本上可以在生成的文档的顶部看到它)
/**
* @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() }