Skip to content

Intermediate newlines+asterisks prevent @param from applying #26027

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 Jul 27, 2018 · 1 comment
Closed

Intermediate newlines+asterisks prevent @param from applying #26027

sandersn opened this issue Jul 27, 2018 · 1 comment
Assignees
Labels
Bug A bug in TypeScript Domain: JSDoc Relates to JSDoc parsing and type generation

Comments

@sandersn
Copy link
Member

sandersn commented Jul 27, 2018

/** @param 
 * {string} x
 * @param {number}
 * y
 */
function f(x,y) {
}

Expected behavior:
x: string and y: number

Actual behavior:
x: any and y: any.

Note that if you remove the asterisks but not the lines, it works as expected.

/** @param 
  {string} x
 * @param {number}
  y
 */
function f(x,y) {
}
@mhegazy mhegazy added the Bug A bug in TypeScript label Jul 28, 2018
@mhegazy mhegazy added the Domain: JSDoc Relates to JSDoc parsing and type generation label Jul 28, 2018
@mhegazy mhegazy added this to the TypeScript 3.1 milestone Jul 28, 2018
@tschaub
Copy link
Contributor

tschaub commented Jul 30, 2018

@sandersn I put up an initial stab at this in #26067. Let me know if someone else is already tackling this (or you'd like to handle it differently).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: JSDoc Relates to JSDoc parsing and type generation
Projects
None yet
Development

No branches or pull requests

3 participants