Exporting an arrow function won't produce documentation
See original GitHub issueIf I have a module like this:
/**
* @module formatmicro
*/
/**
* @param {number} timeMicro
* @param {object|function} incrementNames
* @returns {string}
* @throws {Error} If either argument isn't the correct type
*/
export default (timeMicro, incrementNames) => { }
It won’t produce any documentation. However, if I name the exported function, it will:
/**
* @module formatmicro
*/
/**
* @param {number} timeMicro
* @param {object|function} incrementNames
* @returns {string}
* @throws {Error} If either argument isn't the correct type
*/
export default function formatmicro(timeMicro, incrementNames) { }
Issue Analytics
- State:
- Created 8 years ago
- Reactions:5
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Is it possible to export Arrow functions in ES6/7?
Is it possible to export Arrow functions in ES6/7? Yes. export doesn't care about the value you want to export. The export statement...
Read more >Directly exporting an (arrow) function prevents it from being ...
When using the export const Var = () => console.log('stuff') , the result code prevents the function from using the name of the...
Read more >Arrow function expressions - JavaScript - MDN Web Docs
Arrow functions cannot use yield within their body and cannot be created as generator functions. Try it.
Read more >ES6 Class Mocks - Jest
If you use arrow functions in your classes, they will not be part of the mock. The reason for that is that arrow...
Read more >export default arrow function | The AI Search Engine You Control
You're trying to export a default and declare a variable at the same time, which is invalid syntax. Consider the following, since we...
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
@cullylarson Hi! Thanks for this issue. I will fix it in future version.
+1