Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sandersn opened this issue Mar 8, 2018 · 0 comments
Closed

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

sandersn opened this issue Mar 8, 2018 · 0 comments
Assignees
Labels
Bug A bug in TypeScript Domain: JSDoc Relates to JSDoc parsing and type generation Fixed A PR has been merged for this issue

Comments

@sandersn
Copy link
Member

sandersn commented Mar 8, 2018

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.

@DanielRosenwasser DanielRosenwasser added Bug A bug in TypeScript Domain: JSDoc Relates to JSDoc parsing and type generation labels Mar 9, 2018
@mhegazy mhegazy added this to the TypeScript 2.8.1 milestone Mar 9, 2018
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Mar 28, 2018
@microsoft microsoft locked and limited conversation to collaborators Jul 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Domain: JSDoc Relates to JSDoc parsing and type generation Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

3 participants