Skip to content

Multi-line comments #18

@danielo515

Description

@danielo515

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions