Skip to content

Handle duplicate private classes #783

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
dtgriscom opened this issue May 29, 2018 · 1 comment
Closed

Handle duplicate private classes #783

dtgriscom opened this issue May 29, 2018 · 1 comment

Comments

@dtgriscom
Copy link

dtgriscom commented May 29, 2018

I have three *.ts files, each of which exports a single class but also has a non-exported utility class (TestScreen). The utility classes all have the same constructor signature and inherit from the same (exported) class (Screen), but perform different functions and have different documentation comments.

TypeDoc has trouble handling this:

  • The Screen documentation shows three different TestScreen subclass links, but they all go to the same testscreen.html page
  • The single testscreen.html page seems to merge all three classes' attributes and documentation comments

I would expect TypeDoc to create three separate *.html pages for the three private classes.

Confirmed with TypeDoc version 0.9.0 with TypeScript 2.4.1, and TypeDoc version 0.11.1 with TypeScript version 2.7.2. Workaround is to give each private class a different name.

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Dec 30, 2019

It sounds like you are generating with --mode file, this mode pretends every module is in the global scope and will get very confused since you have multiple conflicting definitions. If you are using modules you should be using --mode modules The library mode (soon... #639) will provide an alternative that I expect will be better for most projects.

@Gerrit0 Gerrit0 closed this as completed Dec 30, 2019
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

2 participants