Skip to content

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

Closed
@DanielRosenwasser

Description

@DanielRosenwasser

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.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: JSDocRelates to JSDoc parsing and type generationDomain: Refactoringse.g. extract to constant or function, rename symbolFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions