Skip to content
This repository has been archived by the owner on Dec 4, 2018. It is now read-only.

Uncaught param syntax error #106

Closed
gyandeeps opened this issue May 17, 2015 · 1 comment
Closed

Uncaught param syntax error #106

gyandeeps opened this issue May 17, 2015 · 1 comment

Comments

@gyandeeps
Copy link
Member

When I try to use the library to parse this syntax it doesn't thow any error:

/**
* @param fields [Array]
*/
function crashIt() {
     return "";
}

But for the below syntax it does throw an syntax error:

/**
* @returns fields [Array]
*/
function crashIt() {
     return "";
}

Is the top @param syntax correct?

@jifeon
Copy link

jifeon commented May 18, 2015

You should place type before the name like this:

/**
 * @param {Array} fields
 */
function crashIt() {
    return "";
}

Here you can read full documentation for @param, the same for @returns

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

No branches or pull requests

2 participants