Skip to content
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

JSDoc extraction doesn't work for index signature object maps #19266

Closed
DanielRosenwasser opened this issue Oct 17, 2017 · 0 comments · Fixed by #19304
Closed

JSDoc extraction doesn't work for index signature object maps #19266

DanielRosenwasser opened this issue Oct 17, 2017 · 0 comments · Fixed by #19304
Assignees
Labels
Bug A bug in TypeScript Domain: JSDoc Relates to JSDoc parsing and type generation Domain: Refactorings e.g. extract to constant or function, rename symbol Fixed A PR has been merged for this issue

Comments

@DanielRosenwasser
Copy link
Member

From https://github.com/Azure/azure-documentdb-js-server/blob/a0e6b1b318284838944c7e1b0d1e5848a0788a6b/samples/stored-procedures/bulkDelete.js#L

/**
 * @param x {Object.<string, number>}
 */
function foo(x) {
}

Extracting a JSDoc comment here gives us object<string, number> which

  1. Isn't the equivalent type (it's actually equivalent to { [x: string]: number }
  2. Is an invalid type reference.
@DanielRosenwasser DanielRosenwasser added Bug A bug in TypeScript Domain: JSDoc Relates to JSDoc parsing and type generation Domain: Refactorings e.g. extract to constant or function, rename symbol labels Oct 17, 2017
@mhegazy mhegazy added this to the TypeScript 2.6.2 milestone Oct 17, 2017
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Oct 18, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 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 Domain: Refactorings e.g. extract to constant or function, rename symbol Fixed A PR has been merged for this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants