-
-
Notifications
You must be signed in to change notification settings - Fork 737
Default exports documented as Class default #111
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
Comments
Right, I've also noted this behaviour. Actually this is not done by TypeDoc but the TypeScript compiler renames the symbols to |
Okay, this is a pretty significant issue as it makes the documentation unhelpful to have all the methods of all exported classes listed on one page. If there is no way to retrieve the class name, I was thinking that using the file name might be an option but it's not perfect. At least it would line up with the name used when importing. Maybe this could be a separate mode option where all types are documented under their respective file name. |
You have all the methods of all exported classes listed on one page? For me the members and methods are rendered correctly although multiple classes are named I've just checked the compiler symbols, they contain a |
Sorry for the confusion and no I don't have my code up online. All the classes that aren't the default export show up correctly. However, the properties and methods of default exports show up under one "default" class. Hopefully that |
Any update on this? |
I switched to using module mode so my docs don't look as bad as they did. But it would be nice to show the exports name. |
I'd like to second another look at this. I've read somewhere that default exports are a best practice, so creating useable docs for this case would seem desirable. Like aciccarello, I'm having to work-around with named exports, which is not a long-term solution (bundling today makes this OK). My suggestion on the resolution would be to "damn the technical inaccuracy". Try to document as if they were named exports and put a note somewhere. The d.ts files or ts source itself will take care that the compile is safe (we don't compile from the docs - they are for humans!). Awesome work BTW. Wish I could be more helpful. |
@mathdoodle I think #398 should fix any other issues you may be having with default eports. Please let someone know if it doesn't. |
I am using ES6 classes with default exports such as
But when the documentation is generated, all of the objects, functions, classes, ect. that were exported as the default export from a file are all showing up as a class called
default
The text was updated successfully, but these errors were encountered: