How to document return value of function that calls another function
<p>Given the following example:</p>

<pre><code>/**
 * An outer function
 * @param {number} age - The age to pass to outerFunction
 * @returns {#What goes here?#}
 */
function outerFunction(age){
    return addTen(age)
}

/**
 * Adds 10 to the age
 * @param {number} age - The age to add 10 to
 * @returns {number} - The age + 10
 */
function addTen(age){
    return 10 + age
}
</code></pre>

<p>the <code>outerFunction</code> returns another function's result.</p>

<p>I thought of several ways to document this:</p>

<ul>
<li><p><code>@returns {number}</code> - We know that <code>addTen</code> returns a number, but what if this changes? We will have to update both (or each time it is returned, which could be a lot), which isn't maintainable.</p></li>
<li><p><code>@returns {function}</code> - I am not sure if this is available in JsDoc. I couldn't find it anywhere. This also doesn't feel like it gives much information.</p></li>
<li><p><code>@returns {any}</code> or - <code>@returns {*}</code> - This isn't particularly helpful to anyone reading the doc.</p></li>
</ul>

<p>None of these feel correct to me for the reasons stated.</p>

<p>I guess I want something like </p>

<pre><code>@returns {addTen.return}
</code></pre>

<p>So that I am essentially saying "<code>outerFunction</code> returns whatever type <code>addTen</code> does".</p>

<p><em>Note</em>: these are in the same place in this example, but could be contained in multiple files, so using <a href="https://stackoverflow.com/questions/30012043/how-to-document-a-function-returned-by-a-function-using-jsdoc">this approach</a> doesn't work, unless it's possible to do this across multiple files.</p>

<p>How do we write JsDoc comments to document that the function returns another function?</p>

<p>Does something similar to my suggestion exist?</p>