Skip to content
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

Multi-line comments #18

Open
danielo515 opened this issue Aug 5, 2018 · 0 comments
Open

Multi-line comments #18

danielo515 opened this issue Aug 5, 2018 · 0 comments

Comments

@danielo515
Copy link

danielo515 commented Aug 5, 2018

Hello,

Today I discovered that your library does not support multi line comments. Is this intentional ? Is it a mistake ? Will it be hard to implement ?

With multi line comments I mean this:

/**
 * @function push
 * @param  {Array} arr The array to use as base to push any element
 * @param  {Any} x Any kind of item that will be pushed into the array
 * @return {Array} The array with a new element at the end
 */
function push arr, x
    [...arr, x]

This will allow me to use JSDoc to document my source code, which is very convenient.

As a workaround I can use a string to include the comment:

"
/**
 * @function push
 * @param  {Array} arr The array to use as base to push any element
 * @param  {Any} x Any kind of item that will be pushed into the array
 * @return {Array} The array with a new element at the end
 */
"
function push arr, x
    [...arr, x]

Not pretty but works, and the impact on output is not huge. If you find any other way or do you know anything I could be doing wrong, I'll be glad to hear it.

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant