question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Default exports documented as Class default

See original GitHub issue

I 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:closed
  • Created 8 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
aciccarellocommented, Jul 8, 2015

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.

0reactions
aciccarellocommented, Feb 1, 2017

@mathdoodle I think #398 should fix any other issues you may be having with default eports. Please let someone know if it doesn’t.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found