To handle this, you need to add a few more bits of syntactic sugar to the jsdoc values. This is because the parser doesn't know to translate 'this.bar()' to 'Foo.bar()'. To resolve it, add something like the following:
/**
* @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.
* @function bar
* @memberof {@link Foo}
*/
this.bar = function(barzipan) { return baz + barzipan; };
}
See JSDoc @memberof and JSDOC @function. This can also help you when you want to create a private function (To document privates, use the -p command when running JSDOC).
function Foo(baz) {
/**
* Returns what Bob did...
* @param {string} doStuff Stuff to pass in.
* @function bob
* @memberof Foo
* @private
*/
var bob = function(doStuff) {
return "Bob did " + doStuff;
}
}