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

Error parsing arrow function #1100

Closed
mturnwall opened this issue Oct 29, 2015 · 1 comment
Closed

Error parsing arrow function #1100

mturnwall opened this issue Oct 29, 2015 · 1 comment

Comments

@mturnwall
Copy link

I have a javascript file that starts with an arrow function.

(($, global) => {
// code
})(jQuery, typeof window === 'undefined' ? this : window);

When I run jsdoc 3.3.3 I get this error ERROR: Unable to parse scripts/check_compat.js: Line 7: Unexpected token =>

How can I get jsdoc to parse my ES6 files correctly? I did a search and it looks like it's supposed to be supported.

@hegemonic
Copy link
Contributor

JSDoc 3.3.x does not support ES2015 code, including arrow functions. JSDoc 3.4.0 (not yet released) will include full support for ES2015. For now, you can use the version of JSDoc on GitHub master, which includes full ES2015 support.

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

2 participants