Skip to content

@param should not error in JS when the function uses arguments #22411

Closed
@sandersn

Description

@sandersn

Code

// @lib: dom,es5,es6
// @target: es6
// @noEmit: true
// @allowJs: true
// @checkJs: true
// @Filename: a.js
/**
 * @param {string} first
 */
function concat(/* first, second, ... */) {
  var s = ''
  for (var i = 0; l = arguments.length; i < l; i++) {
    s += arguments[i]
  }
  return s
}

Expected behavior:
No error.

Actual behavior:
Errors on each of the parameters.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: JSDocRelates to JSDoc parsing and type generationFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions