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.

Documentation for module (Feature Request)

See original GitHub issue

It will be great to add support of documentation for module. Ill explain the case: i have module with logicaly grouped helpers. I can use it with 2 ways. With first i need to create class with static helpers, and export it as default. Then i need to use it in this way:

import helpers from 'helpers';
helpers.method(); 
helpers.const;

With second way ill define all helpers as simple functions and export them all from my module.

let helper = function(){};
export {helper};

Then ill use it:

import * as helpers from 'helpers';
helpers.method(); 
helpers.const;

But with this way i can import only helpers i need, by their names:

import {method, const} from 'helpers';
method(); 
const;

and using them will be much easier. With static class approach i need to always use it as namespace for my methods. So if i need to export some helpers from my module i will always choose second way of exporting. But the problem of this is i can not documentate module. The only solution i found it is defining static class and then export methods from them as one namespace. May be it will be better to provide functionality to documentate module?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:20 (7 by maintainers)

github_iconTop GitHub Comments

8reactions
siarhei-klimutscommented, Mar 24, 2016

Replaced jsdoc by esdoc recently. So my code has module tags and most of functions don’t wrapped by classes. My index.js file exports some functions as library functions (lib.function) and some functions as modules functions (lib.module.function). So how can I tell esdoc to document my modules for these cases? Is it possible with esdoc or should I return to jsdoc?

7reactions
PinkaminaDianePiecommented, Oct 27, 2017

@ProLoser check http://documentation.js.org/ also. It work nicely with any es-next features, even staged ones and can parse types from Flow annotations. Moved to it from esdoc without any regrets, because first order function support is must-have feature to js since it’s not object oriented, but multi-paradigm

Read more comments on GitHub >

github_iconTop Results From Across the Web

Suggesting New Features | Contributing to the Give Project
Suggest a new feature by submitting an issue in the issue queue, with the category "Feature request." List of current feature requests. We ......
Read more >
Python API documentation generation tool / Feature Requests
#. Sort A ‑> Z; Sort Z ‑> A Summary▾. Sort A ‑> Z; Sort Z ‑> A Milestone▾. Sort A ‑> Z;...
Read more >
Requests - Read the Docs
Requests is an elegant and simple HTTP library for Python, built for human ... This part of the documentation, which is mostly prose,...
Read more >
Requests Documentation - Read the Docs
This document covers some of Requests more advanced features. 2.3.1 Session Objects. The Session object allows you to persist certain ...
Read more >
How we handle Feature Requests - WHMCS Documentation
Feature Request Status Definitions ; Planned, Planned indicates that a request has been or is already part of our future product roadmap and...
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