Skip to content

@template tag is not visible in class body #23459

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

Closed
DanielRosenwasser opened this issue Apr 17, 2018 · 1 comment
Closed

@template tag is not visible in class body #23459

DanielRosenwasser opened this issue Apr 17, 2018 · 1 comment
Assignees
Labels
Bug A bug in TypeScript Domain: JSDoc Relates to JSDoc parsing and type generation Fixed A PR has been merged for this issue

Comments

@DanielRosenwasser
Copy link
Member

Found playing with https://github.com/lukeed/tmp-cache

// @ts-check

/**
 * @template {T}
 */
class Foo {
    /**
     * 
     * @param {T} x 
     */
    foo(x) {	
    }
}

This will give the following error on T in the @param tag.

Cannot find name 'T'.
@sandersn
Copy link
Member

@template just didn't work at all for classes. The fix is up at #23511.

@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Apr 20, 2018
@microsoft microsoft locked and limited conversation to collaborators Jul 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Domain: JSDoc Relates to JSDoc parsing and type generation Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

3 participants