I have an entry point index.ts for my library that contains only an export default and export declarations:
import Main from './Main'
export default Main
export { default as State } from './state'
export { default as ThingModel } from './state/Thing/Model'
export { default as ThingCollection } from './state/Thing/Collection'
// etc ...
When I generate docs via TypeDoc it is an empty file. I would expect it to list what is exported from this module:
Hi @octatone, how are you calling/what are you using for your typedoc configuration.
via shell:
typedoc --options ./config/typedoc.js --out ./docs ./src
typedoc.js:
module.exports = {
mode: "modules",
module: "umd",
target: "ES5",
externalPattern: "node_modules",
excludeExternals: true,
excludePrivate: true
}
index.ts lives at ./src/index.ts
I get the same empty output regardless of options or no options (default options).
From a quick poke around, am I right in thinking this behavior is because typedoc only supports ts.SyntaxKind.ExportAssignment and the export syntax in use is ts.SyntaxKind.ExportDeclaration?
I'm guessing this isn't going to be fixed anytime soon?
And how can the export syntax be changed from ExportDeclaration to ExportAssignment? Any idea?
This will be fixed by #801
Could you set up an example repo showing this problem? The tests for it are passing... seems to be working for me.
Ah, nevermind, explicitly changing it to export {...} from syntax fixes this. Re-exporting the imports doesn't work though.
Ah, that makes some sense. Yet another reason coming back to why we need to use the type checker to get this information instead of walking the node tree and trying to figure it out ourselves... Glad you found a workaround for now.
Most helpful comment
From a quick poke around, am I right in thinking this behavior is because typedoc only supports
ts.SyntaxKind.ExportAssignmentand the export syntax in use ists.SyntaxKind.ExportDeclaration?