Content-Length: 293781 | pFad | https://github.com/microsoft/TypeScript/issues/12681

C7 Support @class in JSDoc · Issue #12681 · microsoft/TypeScript · GitHub
Skip to content

Support @class in JSDoc #12681

@mjbvz

Description

@mjbvz

From microsoft/vscode#15168

For the following JavaScript code:

/**
 * @class
 * 
 * @param {number} x
 */
function Foo(x) {
    this.x = x
}

/**
 * @param {Foo} foo
 */
const request = function(foo) {

}

The @class jsdoc annotation for Foo does not seem to be recognized, so the type of foo in request is any:

screen shot 2016-12-05 at 3 25 07 pm

Changing the code to use class fixes the issue (you don't actually need the @class in this case):

screen shot 2016-12-05 at 3 26 45 pm

Metadata

Metadata

Assignees

No one assigned

    Labels

    Domain: JSDocRelates to JSDoc parsing and type generationDomain: JavaScriptThe issue relates to JavaScript specificallyHas ReproThis issue has compiler-backed repros: https://aka.ms/ts-reprosHelp WantedYou can do thisSuggestionAn idea for TypeScriptVS 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









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/microsoft/TypeScript/issues/12681

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy