documentationjs / documentationjs/documentation
@typedef and @interface comments should not have parameter inference, possibly not any?
Open
- Dominant language
- JavaScript
- Stars
- 5.8k
- Forks
- 481
- PR merge metrics
- No merged PRs in 30d
Description
When generating [documentation of the jsdoc @typedef](http://usejsdoc.org/tags-typedef.html) example, documentationjs adds 'x' as a parameter to the object NumberLike.
The way this seems to work is that the parameters of the function following the @typedef are added to the @typedef object. Moving the @typedef to the bottom of a file fixes the issue.
`/**
* A number, or a string containing a number.
* @typedef {(number|string)} NumberLike
*/
/**
* Set the magic number.
* @param {NumberLike} x - The magic number.
*/
function setMagicNumber(x) {
}
`
Contributor guide
Assessment
This issue has not been assessed yet.