-
Notifications
You must be signed in to change notification settings - Fork 271
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
How to Handle Docstrings #39
Comments
+1 |
Why is it undesired? |
@anonomis Our concern was that it adds unnecessary weight code to production code. |
@cooncesean If you mangle your code through a minimizer before reaching production (which I strongly encourage you to do) the comments will be omitted anyway. |
@anonomis Thank you, that's a very good idea. So, in your opinion, triple pound ( |
We've had success with using JSDoc directly. For example: ###*
* The version number of this library.
*
* @member
* @instance
* @readonly
* @memberof Library
* @type {string}
###
version: (require "../../package.json").version For other options, also see: |
We're having an internal discussion on our team about the best practice for handling docstrings. In Python, we'd do something like:
In coffeescript, we'd like to mimic the pattern:
I like this approach as it distinctly separates "docstrings" from inline comments, but it appears that triple
###
renders a multi-line comment to the compiled javascript -- which is probably undesired in most cases.Any guidance would be helpful - thx :)
The text was updated successfully, but these errors were encountered: