Skip to content

In JSDocs notation for index signatures, Object and object should be treated as the same #20555

Open
@michaeljota

Description

TypeScript Version: 2.7.0-dev.201xxxxx

Code

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

Expected behavior:

obj should have a index signature as in #15105

Actual behavior:

obj is treated as any

Additional Info:

This was mentioned in the above issue, and it seems to be related to the way Typescript manage Object and object, but in JSDocs, they are treated similar.

Metadata

Assignees

No one assigned

    Labels

    Domain: JSDocRelates to JSDoc parsing and type generationIn DiscussionNot yet reached consensusSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions