Skip to content

Support Object.<type1, type2> JSDoc notation for index signatures  #15105

@mjbvz

Description

@mjbvz

From: microsoft/vscode#24291
TypeScript Version: 2.2.2

Code

/**
 * Test.
 *
 * @param {Object.<string, number>} obj An object.
 */
function func(obj) {
	console.log(obj);
}

Expected behavior:

obj has a type of Object<string, number> (at at least some equivalent type with an index signature). This syntax is valid according to http://usejsdoc.org/tags-type.html

Actual behavior:
obj has an any type

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: JSDocRelates to JSDoc parsing and type generationFixedA PR has been merged for this issueVS Code TrackedThere is a VS Code equivalent to this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions