Skip to content

Module pollution - a few questions on the design of Typedoc #774

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ghost opened this issue May 18, 2018 · 1 comment
Closed

Module pollution - a few questions on the design of Typedoc #774

ghost opened this issue May 18, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented May 18, 2018

I just tried out typedoc and really like it thus far. Unfortunately there are some flaws I don't understand yet which I'd like to know more about. For testing purposes I used the source files from the following folder structure:
screen shot 2018-05-18 at 01 37 23
When I ran typedoc for the first time I got this output:
screen shot 2018-05-18 at 01 37 54
Basically every single TypeScript file was considered a single module in itself, even though I have one and only one type/class/interface per file. After turning on --mode file I got the following output:
screen shot 2018-05-18 at 01 38 10
In the second example it is unfortunate that there is no way to distinguish which folders the specific classes/interface come from. This is even more obvious when adding another class with the same name in another folder. Although bad in design, it can actually happen in a library that is big enough. What happens is, that typedoc merges all classes/enums/interfaces with the same name and only creates one bullet point with all members and documentation comments merged.

The only useful plugin I found thus far is asgerjensen/typedoc-plugin-external-module-map which allows some minor grouping. In fact I consider that particular plugin to be useful to create a documentation for multiple projects that get grouped using the plugin.

I'd like to know whether you are aware of the documentations that erroneously get merged and would like to know which options or plugins I can leverage to bring some order into this chaos.

@aciccarello
Copy link
Collaborator

Hello @nearautomata, thanks for bringing up these points. Right now typedoc does not handle a directory structure very well but it is something that would be great to support better in the future. I'll close this as a duplicate of #379

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant