I'm a little new to jsdoc comments (attempting to convert some vsdoc comments to jsdoc so I can make use of doc generators that support jsdoc), so stop me if I'm doing something obviously incorrect, but I noticed that if you assign methods on a constructor's prototype, intellisense works for that member:
/**
* @constructor
* @this {Foo}
*/
function Foo() {}
/**
* A bar of Foo for you.
* @param {string} baz A foo bar baz.
* @return {string} You get back what you give.
*/
Foo.prototype.bar = function(baz) { return baz; }
But, if you assign bar in the constructor, the intellisense on the bar method breaks - it just shows the entire comment, jsdoc tags and all, as a single block. It doesn't display argument types or flow the return value through:
/**
* @constructor
* @this {Foo}
* @param {string} baz A foo bar baz.
*/
function Foo(baz) {
/**
* A bar of Foo and something else too.
* @param {string} barzipan A little something extra.
* @return {string} You get back what you gave, and then some.
*/
this.bar = function(barzipan) { return baz + barzipan; };
}
The vsdoc intellisense parser is able to handle either methods on the prototype or methods assigned to this, but the jsdoc parser appears to be confused by methods assigned to this in a constructor.