Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
132
rated 0 times [  139] [ 7]  / answers: 1 / hits: 37003  / 12 Years ago, wed, january 2, 2013, 12:00:00

Is there a list somewhere of valid types for param tags for jsdoc? For example,



@param {type} myParam Some parameter description


I know that things like number and String are valid, but what if I want to document that the number is an integer. Is int valid?



I've done some googling, but I can't seem to find a full list.


More From » jsdoc

 Answers
20

The JS Documentation tooling I've used just tokenizes the comments into strings anyway, making it possible to put anything you want in the {type} section.



You could stick with JavaScript types if you wanted like {number} or {string}, or if you want to specify you could do {integer}... but I would probably recommend something like:



@param {number} myParam must be an integer



cheers


[#81120] Monday, December 31, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
johnnaj

Total Points: 490
Total Questions: 109
Total Answers: 104

Location: Zambia
Member since Thu, Jun 25, 2020
4 Years ago
;