I am using JSDoc for parameter documentation.
It is clear how to document the parameter types for many_prompts, but what is the right way to document th
This seems to be working for me.
/**
* @param {Number} count - number of times to prompt
* @return {function(): void} - the returned function
*/
manyPrompts(count) {
/**
* My inner function
*
* @param {object} prompt Some parameter
*/
const inner = function(prompt) {
for (let i=0; i < count; i++) {
alert(prompt);
};
};
return inner;
}