Default exports documented as Class default
See original GitHub issueI am using ES6 classes with default exports such as
export default 'testApp';
// or
export default class DataService {
...
}
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
Issue Analytics
- State:
- Created 8 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
export - JavaScript - MDN Web Docs
Every module can have two different types of export, named export and default export. You can have multiple named exports per module but...
Read more >Typescript export vs. default export - Stack Overflow
Also, I couldn't find any trace of the default export keyword in the official typescript documentation. export class MyClass { collection ...
Read more >Named Export vs Default Export in ES6 | by Alankar Anand
Concerning the default export, there is only a single default export per module. A default export can be a function, a class, an...
Read more >Export and Import - The Modern JavaScript Tutorial
Modules provide a special export default (“the default export”) syntax to make ... user.js export default class User { // just add "default" ......
Read more >JS: Export vs Export Default | Matt Shelley
According to the MDN web docs, default exports are useful “to export a single value or to have a have a fallback value...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
@mathdoodle I think #398 should fix any other issues you may be having with default eports. Please let someone know if it doesn’t.