Say you have this function :
/**
* doSomething description
* @param {function} fn - A function that accepts an argument.
*/
function doSomething( fn ) {
fn.call(this, 'This is a test');
}
And doSomething should be used like this :
doSomething( function( text ) {
console.log( text );
});
My question is : Is there an official way in JSDoc to document fn parameters ? May be something like :
/**
* doSomething description
* @param {function} fn - A function that accepts an argument.
* @param {string} fn( name ) - A text passed to the fn function.
*/
function doSomething( fn ) {
fn.call(this, 'test');
}