Skip to content

Conversation

@sandersn
Copy link
Member

And Object<number, T> creates a numeric index signature. Other uses still map to any as before.

Fixes #15105

And `Object<number, T>` creates a numeric index signature. Other uses
still create `any` as before.
return node.flags & NodeFlags.JSDoc && node.kind === SyntaxKind.TypeReference;
}

function getPrimitiveTypeFromJSDocTypeReference(node: TypeReferenceNode): Type {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't really an apropos name anymore. Perhaps call this getIntendedTypeFromJsDocTypeReference.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I like your suggested name too.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@sandersn sandersn merged commit 1b7faf1 into master Jul 18, 2017
@sandersn sandersn deleted the generic-Object-jsdoc-creates-index-signature branch July 18, 2017 15:49
@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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants