gpt4 book ai didi

jsdoc - 如何在jsDoc中制作方法参数类型的链接

转载 作者:行者123 更新时间:2023-12-04 18:39:40 26 4
gpt4 key购买 nike

是否有任何自然方式或特殊标签将参数类型作为链接?
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;
};

最佳答案

幸运的是,正确的名称路径并不总是很明显(但您基本上可以在生成的文档顶部看到它)

/**
* @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 - 如何在jsDoc中制作方法参数类型的链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29622478/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com