-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
FixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
Using the Salsa work with @param tags works fine for function declarations, but not for assignments of function expressions. This is particularly a problem in the CommonJS case. For example with the module below, sub correctly shows the params as of type number, whereas add shows them as type any.
/**
* @param {number} a The number to subtract from
* @param {number} b The number to subtract
*/
function sub(a, b) {
return a - b;
}
exports.sub = sub;
/**
* @param {number} a - First term
* @param {number} b - Second term
*/
exports.add = function(a, b) {
return a + b;
}The JsDoc tags should apply to the resulting value of the expression.
Metadata
Metadata
Assignees
Labels
FixedA PR has been merged for this issueA PR has been merged for this issue