Open mramato opened 4 years ago
This looks like a dupe of #105 which should be fixed in the latest version, can you confirm?
@englercj I can confirm that it happens with 2.5.0 (installed via npm). Also, I was using jsdoc 3.6.4 (latest version via npm) in case that matters.
I put together a reduced test case that you can run to see the problem: issue133.zip (Just npm install
and then npm start
Basically it includes SomeClass.js, a simplified package.json where npm start
simple runs:
jsdoc --configure ts-conf.json
where ts-conf.json
is
{
"source": {
"include": [
"SomeClass.js"
]
},
"opts": {
"template": "./node_modules/tsd-jsdoc/dist"
}
}
and the output is
$ npm start
> issue133@0.0.0 start /home/mamato/Git/issue133
> jsdoc --configure ts-conf.json
[TSD-JSDoc] SomeClass.js:11:0 Failed to find parent of doclet 'SomeClass.someFunction' using memberof 'SomeClass', this is likely due to invalid JSDoc.
[TSD-JSDoc] SomeClass.js:16:0 Failed to find parent of doclet 'SomeClass.somePrototypeFunction' using memberof 'SomeClass', this is likely due to invalid JSDoc.
@englercj if there's anything I can do to help out here, please let me know. I suppose I can just pull down master and open a PR, but wanted to make sure you would be willing to review/accept it first.
FYI we just opened our Cesium pull request which uses tsd-jsdoc https://github.com/CesiumGS/cesium/pull/8878 and you'll be happy to hear that everything else worked great. I'm not sure how big the typical TypeScript type definition is, but ours ended up being ~41,000 lines and 1.9 MB :smile:
Thanks again for a great tool.
PRs are the best way to get changes to this repo. I don't spend much time on it these days.
Given SomeClass.js
tsd-jsdoc outputs the below, incorrect, warnings:
tsd-jsdoc should pick up on the fact that
SomeClass
is marked private and not print warnings forsomeFunction
orsomePrototypeFunction
because they are automatically made private as well (according to JSDoc). JSDoc has no issues with this file.I was able to hack up the JS to fix for this in my local tsd-jsdoc install, but would be happy to open a PR to fix it properly. I did this by adding an
_ignoredNodes
property to Emitter and then wrapping the warning in an additional check to see if thememberof
is an ignored node and only displaying the warning if that is the case.Thanks again for an awesome tool.