typedoc-plugin-markdown
typedoc-plugin-markdown copied to clipboard
Does not support namespace (or module) and interface with same name
trafficstars
First, thank you for this plugin! It's really helpful and I'm using to generate some great Just The Docs themed documentation for another open source project.
TypeScript and TypeDoc both support merged interfaces and namespaces. For example:
// thing.ts
export interface Thing {
a: number;
b: number;
add(): number;
}
export namespace Thing {
export const create = (): Thing => {
return { a: 1, b: 2 };
}
}
// consumer.ts
const consumer = (thing: Thing): void => {
thing.add();
}
const thing = Thing.create();
consumer(thing);
In native TypeDoc, this results in a file under /modules/Thing.html and another under /interfaces/Thing.html. Using this plugin, I've found that we end up with /Thing/index.md that only references the interface. The module (and associated functions) are not included anywhere in the generated documentation.
Given the output format, I might have expected something like:
... front matter...
# Interface: Thing
... content ...
# Namespace: Thing
... content ...