-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Open
Labels
Domain: JSDocRelates to JSDoc parsing and type generationRelates to JSDoc parsing and type generationDomain: JavaScriptThe issue relates to JavaScript specificallyThe issue relates to JavaScript specificallyHas ReproThis issue has compiler-backed repros: https://aka.ms/ts-reprosThis issue has compiler-backed repros: https://aka.ms/ts-reprosHelp WantedYou can do thisYou can do thisSuggestionAn idea for TypeScriptAn idea for TypeScriptVS Code TrackedThere is a VS Code equivalent to this issueThere is a VS Code equivalent to this issue
Milestone
Description
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
:
Changing the code to use class
fixes the issue (you don't actually need the @class
in this case):
HerringtonDarkholme, huyqut, icholy, waderyan, IagoSRL and 6 more
Metadata
Metadata
Assignees
Labels
Domain: JSDocRelates to JSDoc parsing and type generationRelates to JSDoc parsing and type generationDomain: JavaScriptThe issue relates to JavaScript specificallyThe issue relates to JavaScript specificallyHas ReproThis issue has compiler-backed repros: https://aka.ms/ts-reprosThis issue has compiler-backed repros: https://aka.ms/ts-reprosHelp WantedYou can do thisYou can do thisSuggestionAn idea for TypeScriptAn idea for TypeScriptVS Code TrackedThere is a VS Code equivalent to this issueThere is a VS Code equivalent to this issue