jsdoc-to-markdown
jsdoc-to-markdown copied to clipboard
Decorated classes get named "_class" in output .md file
Hello there, in the process of trying to create markdown documentation for an angular / typescript project I am encountering the following issue:
Every class that is decorated with something like @Component
, will be called "_class" in the output .md file.
How can I get the correct classname?
I am using the following jsdoc2md.json file:
{
"source": {
"includePattern": ".+\\.ts(doc|x)?$",
"excludePattern": ".+\\.(test|spec).ts"
},
"plugins": [
"plugins/markdown",
"node_modules/jsdoc-babel"
],
"babel": {
"extensions": ["ts", "tsx"],
"ignore": ["**/*.(test|spec).ts"],
"babelrc": false,
"presets": [
["@babel/preset-env", { "targets": { "node": true } }],
"@babel/preset-typescript"
],
"plugins": [
["@babel/plugin-proposal-decorators", { "legacy": true }],
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-object-rest-spread"
]
}
}
I have the same problem, did you solve it?
Unvortunately I couldnt fix it.
I moved on to transpile the typescript code to javascript and go from there using:
tsc -p tsconfig.json &>/dev/null
You have to lookup the output dir in the tsconfig.json and pass it on to jsdoc2md.
I hope this helps.