vscode icon indicating copy to clipboard operation
vscode copied to clipboard

No jsDoc intellisense when function is declared as part of prototype.

Open kamiua opened this issue 10 years ago • 3 comments

  • VSCode Version: 1.0.0
  • OS Version: Windows 10

Steps to Reproduce:

  1. Create js file with following code:
function constructorFunction () {}

/**
 * The prototype method.
 * @param {String} a Parameter definition.
 */
function prototypeMember(a) {}

constructorFunction.prototype.method = prototypeMember;

var x = new constructorFunction();
x.method();
  1. Check that intellisense shows parameter description for x.method().
  2. Replace method definition with shorter syntax:
/**
 * The prototype method.
 * @param {String} a Parameter definition.
 */
constructorFunction.prototype.method = function (a) {};

Intellisense for x.method() is not working now both for function and param descriptions.

kamiua avatar Apr 18 '16 12:04 kamiua

Moving to TS.

dbaeumer avatar Apr 18 '16 15:04 dbaeumer

This issue was moved to Microsoft/TypeScript#8147

dbaeumer avatar Apr 18 '16 15:04 dbaeumer

This works for me on master.

@DenysYefimenko, can you test this by installing typescript@next in a test package and in Code's settings.json temporarily setting "typescript.tsdk": ".../node_modules/typescript/bin", where ... is the path of your test npm package? (You'll have to restart Code or Reload Window to get the changes.)

sandersn avatar Jun 06 '16 16:06 sandersn