Skip to content

Wrong parsing result when no type is given #176

@tomek-he-him

Description

@tomek-he-him

The very first example of the jsDoc @param page shows that the type is optional:

/**
 * @param somebody
 */
function sayHello(somebody) {
    alert('Hello ' + somebody);
}

And yet dox chokes when no type is given:

$ cat <<——— | dox --raw --debug
/**
* @param [a]
*/
———
[ { tags: 
    [ { type: 'param',
        // …
        optional: false } ],
    /* … */ } ]

Everything is ok when you pass a type:

$ cat <<——— | dox --raw --debug
/**
* @param {any} [a]
*/
———
[ { tags: 
    [ { type: 'param',
        // …
        optional: true } ],
    /* … */ } ]

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