如何在jsDoc中建立方法参数类型的链接 [英] How to make link of method parameter type in jsDoc
本文介绍了如何在jsDoc中建立方法参数类型的链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有任何自然方法或特殊标签将参数类型设置为链接?
Is there any natural way or special tag to make parameter type as link?
/**
* 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;
};
推荐答案
幸运的是,正确的名称路径并不总是很明显(但是您基本上可以在生成的文档顶部看到它)
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() }
这篇关于如何在jsDoc中建立方法参数类型的链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文