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

Wrong parsing result when no type is given #176

Open
tomek-he-him opened this issue Jun 25, 2015 · 0 comments
Open

Wrong parsing result when no type is given #176

tomek-he-him opened this issue Jun 25, 2015 · 0 comments

Comments

@tomek-he-him
Copy link
Contributor

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 } ],
    /* … */ } ]
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