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;
};
The parameter type can be a built-in JavaScript type, such as stringor Object, or a JSDoc namepathto another symbol in your code. If you have written documentation for the symbol at that namepath, JSDoc will automatically link to the documentation for that symbol.
If you have written documentation for the symbol at that namepath, JSDoc will automatically link to the documentation for that symbol. You can also use a type expression to indicate, for example, that a parameter is not nullable or can accept any type; see the @typetag documentationfor details.
To create a JSDoc comment Position the caret before the declaration of the method/function or field to document, type the opening block comment /**, and press Enter. Describe the listed parameters, return values, and so on. Alternatively, use the dedicated Fix Doc Comment action.
JSDoc is configurable, and of course you can place it in an NPM script for convenience. "I don't see any value in adding documentation to my code. Why should I bother?" I see where you're coming from! For typed languages like Java or TypeScript adding types to parameters in the documentation would be redundant.
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() }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With