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

Cannot use generic types in JsDoc #6814

Closed
billti opened this issue Feb 2, 2016 · 0 comments
Closed

Cannot use generic types in JsDoc #6814

billti opened this issue Feb 2, 2016 · 0 comments
Assignees
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@billti
Copy link
Member

billti commented Feb 2, 2016

Generic types may not be specified for variable, param, or return types currently. For example, both of the below just show up as 'any's.

/** @type {PromiseLike<string>} */
var a9;

/**
 * @return {PromiseLike<string>}
 */
function f9(){}

We should support this using a syntax like that show above, which closely matches TypeScript's and is covered in the Closure Compiler docs also (https://developers.google.com/closure/compiler/docs/js-for-compiler#instantiating-a-generic-type)

@billti billti added the Salsa label Feb 2, 2016
@billti billti added this to the TypeScript 1.8.2 milestone Feb 2, 2016
@mhegazy mhegazy added the Bug A bug in TypeScript label Feb 2, 2016
RyanCavanaugh added a commit to RyanCavanaugh/TypeScript that referenced this issue Feb 2, 2016
@RyanCavanaugh RyanCavanaugh added the Fixed A PR has been merged for this issue label Feb 2, 2016
RyanCavanaugh added a commit to RyanCavanaugh/TypeScript that referenced this issue Feb 5, 2016
Fixes microsoft#6814

(cherry picked from commit 6e06bb3)

# Conflicts:
#	tests/cases/fourslash/jsDocGenerics1.ts
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

3 participants