You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am authoring a function library. I started out in vanilla javascript with jsdoc-to-markdown version 6.0.1.
I use jsdoc-to-markdown to present all contained functions without any mutual relationships.
Some functions are grouped in one file, many have their own file. The library itself is a flat iife with all functions.
I can't break that.
I decided to convert the library to typescript and followed the instructions on the wiki about typescript and multiple named exports and entered module names in files with multiple functions. I ended up with garbled output for functions in these files.
I have for example the following module, containing two functions to be used independently:
/** * @module mathFunctions *//** * Calculate sum of array with Numbers * @param {number[]} seq - array containing numbers * @return {number} the sum of the numbers */constmathSum=(seq: number[]): number=>seq.reduce((a,b)=>a+b,0)/** * Calculate average of array with Numbers * @param {number[]} seq - array containing numbers * @return {number} the average of the numbers */constmathAvg=(seq: number[]): number=>mathSum(seq)/seq.length||0export{mathSum,mathAvg}
When the code is processed mathSum is presented twice:
The first time as static property of the module with the description and parameters of mathAvg.
The second time as a inner method of the module with its own description and parameters.
mathAvg is not mentioned at all.
## mathFunctions
* [mathFunctions](#module_mathFunctions)
* _static_
* [.mathSum](#module_mathFunctions.mathSum) ⇒ <code>number</code>
* _inner_
* [~mathSum(seq)](#module_mathFunctions..mathSum) ⇒ <code>number</code><aname="module_mathFunctions.mathSum"></a>
### mathFunctions.mathSum ⇒ <code>number</code><p>Calculate average of array with Numbers</p>
**Kind**: static property of [<code>mathFunctions</code>](#module_mathFunctions)
**Returns**: <code>number</code> - <p>the average of the numbers</p>
| Param | Type | Description |
| --- | --- | --- |
| seq | <code>Array.<number></code> | <p>array containing numbers</p> |
<aname="module_mathFunctions..mathSum"></a>
### mathFunctions~mathSum(seq) ⇒ <code>number</code><p>Calculate sum of array with Numbers</p>
**Kind**: inner method of [<code>mathFunctions</code>](#module_mathFunctions)
**Returns**: <code>number</code> - <p>the sum of the numbers</p>
| Param | Type | Description |
| --- | --- | --- |
| seq | <code>Array.<number></code> | <p>array containing numbers</p> |
When I remove the module doc block the information is garbled in the same fashion:
## Members
<dl><dt><ahref="#mathSum">mathSum</a> ⇒ <code>number</code></dt><dd><p>Calculate average of array with Numbers</p></dd></dl>
## Functions
<dl><dt><ahref="#mathSum">mathSum(seq)</a> ⇒ <code>number</code></dt><dd><p>Calculate sum of array with Numbers</p></dd></dl><aname="mathSum"></a>
## mathSum ⇒ <code>number</code><p>Calculate average of array with Numbers</p>
**Kind**: global variable
**Returns**: <code>number</code> - <p>the average of the numbers</p>
| Param | Type | Description |
| --- | --- | --- |
| seq | <code>Array.<number></code> | <p>array containing numbers</p> |
<aname="mathSum"></a>
## mathSum(seq) ⇒ <code>number</code><p>Calculate sum of array with Numbers</p>
**Kind**: global function
**Returns**: <code>number</code> - <p>the sum of the numbers</p>
| Param | Type | Description |
| --- | --- | --- |
| seq | <code>Array.<number></code> | <p>array containing numbers</p> |
Ideally I would like to see the functions presented without any relationships. Like how it was with version 6.0.1 and before converting to typescript. The module name is not important to the consumer of this library.
But the main thing is of course to present the two functions. I don't want to edit the file after processing.
Hi, I am using jsdoc-to-markdown version 7.1.0
I am authoring a function library. I started out in vanilla javascript with jsdoc-to-markdown version 6.0.1.
I use jsdoc-to-markdown to present all contained functions without any mutual relationships.
Some functions are grouped in one file, many have their own file. The library itself is a flat iife with all functions.
I can't break that.
I decided to convert the library to typescript and followed the instructions on the wiki about typescript and multiple named exports and entered module names in files with multiple functions. I ended up with garbled output for functions in these files.
I have for example the following module, containing two functions to be used independently:
When the code is processed mathSum is presented twice:
The first time as static property of the module with the description and parameters of mathAvg.
The second time as a inner method of the module with its own description and parameters.
mathAvg is not mentioned at all.
When I remove the module doc block the information is garbled in the same fashion:
Ideally I would like to see the functions presented without any relationships. Like how it was with version 6.0.1 and before converting to typescript. The module name is not important to the consumer of this library.
But the main thing is of course to present the two functions. I don't want to edit the file after processing.
jsdoc2md.json:
command:
The text was updated successfully, but these errors were encountered: