microsoft / TypeScript

TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
https://www.typescriptlang.org
Apache License 2.0
100.95k stars 12.48k forks source link

JSDoc optional param forms will not display parameter info. #11493

Closed waderyan closed 7 years ago

waderyan commented 8 years ago

From @OverlyExcessive on October 5, 2016 12:8

According to the documentation of JSDoc support in VSCode, posted below. Then optional parameters can be declared in all of the below forms. However it seems that as of VSCode 1.5.3 the last two forms the latter two forms in the sample will not display parameter information.

// Parameters may be delcared in a variety of syntactic forms

/**
 * @param {string}  p1 - A string param. 
 * @param {string=} p2 - An optional param 
 * @param {string} [p3] - Another optional param.
 * @param {string} [p4="test"] - An optional param with a default value
 * @return {string} This is the result
 */
function fn3(p1, p2, p3, p4){
  // TODO
}

Copied from original issue: Microsoft/vscode#13243

waderyan commented 8 years ago

@OverlyExcessive thank you for opening this issue.

If I'm understanding you correctly, in VS Code 1.5.3 you are not seeing parameter information for p3 and p4. By parameter information do you mean type information?

Using the latest VS Code Insiders 1.6 (you can download that here), I am not seeing the issue.

image

Please confirm that I understand you correctly and that I am not seeing the issue in the latest bits. If I misunderstood please send a screenshot of what you are seeing.

waderyan commented 8 years ago

From @OverlyExcessive on October 6, 2016 20:16

@waderyan

Thank you for the quick reply. What I mean by parameter information is not the type information, rather the parameter description that will be supplied as you are entering the parameters in order. I have attached of how it looks for the first parameters below:

captvs

And the missing parameter info here:

captvs2

I hope this clarifies what I meant.

waderyan commented 8 years ago

@OverlyExcessive thank you for clarifying. This has been confirmed with the latest bits. Moving to TS repo.

mhegazy commented 7 years ago

Should be working correctly in latest drop of TypeSript (TS 2.1.4 or later). VSCode ships with an older version of TypeScript. Please see Using Newer TypeScript Versions documentation for more details on updating your VSCode to use a different version of TypeScript.

DaveVoyles commented 7 years ago

I hate to re-open this, but I don't know if it has been corrected, as I am having the same issue.

VS Code will not display comments about each parameter.

VS Code July 2017 v. 1.15 TSC Version 2.4.2

image