Bug 421322 - JSDoc on Array
Summary: JSDoc on Array
Status: NEW
Alias: None
Product: JSDT
Classification: WebTools
Component: Web (show other bugs)
Version: 3.5.1   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: Future   Edit
Assignee: Project Inbox CLA
QA Contact: Chris Jaun CLA
URL:
Whiteboard:
Keywords: plan
Depends on:
Blocks:
 
Reported: 2013-11-08 06:29 EST by Nicolas Ternisien CLA
Modified: 2014-05-29 13:49 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Ternisien CLA 2013-11-08 06:29:02 EST
Version: 1.5.1.v201307171524-7H7FFhVFC7sResSz-gpggbs
Build id: 20130816211629

If I type any of the following form of JSDoc description of a typed array parameter, I get the warning: "JSdoc: Invalid param tag name".

/**
 * @param {String[]} List of strings (1)
 * @param {Array.<string>} List of strings (2)
 * @param {Array<String>} List of strings (3)
 * @param {Array&lt;String&gt;} List of strings (4)
 * 
 * 
 * @returns {String[]} List of strings (5)
 */
var my = function(param) {
	return param;
};


Is there any reason for this, considering all these forms are legal from the JSDoc point of view?

http://code.google.com/p/jsdoc-toolkit/wiki/TagParam
http://usejsdoc.org/tags-type.html
Comment 1 Chris Jaun CLA 2013-11-08 13:57:11 EST
No reason. Looks like a problem with the jsdoc validation.
Comment 2 Nicolas Ternisien CLA 2013-11-08 15:45:02 EST
Good to know this is an unexpected behavior!

By the way, are JSDoc comments used to improve the validation and autocompletion of the Javascript code?
Comment 3 Chris Jaun CLA 2013-11-08 15:58:26 EST
Yes, in some cases JSdoc comments are used to infer what type a variable may be, what functions return and types of their parameters.