Closed csaroff closed 9 years ago
Currently arrow function does not work.
If you can't wait my update, patches are very welcome.
Okay, thank you heavenshell. I'll take a look at it this weekend, but I'm not sure that I'll have time to commit a patch. I just wanted to add feature request, but I didn't know how to add the enhancement label. Thanks for all of your work. You're a hero!
@csaroff Try https://github.com/heavenshell/vim-jsdoc/tree/feature_arrow_function branch.
let g:jsdoc_enable_es6 = 1
/**
* foo
*
* @param {number} arg1
* @param {number} arg2
* @return {undefined}
*/
const foo = (arg1, arg2) => true;
/**
* f
*
* @param {number} arg1
* @return {undefined}
*/
const f = arg1 => true;
I'm not familar to ES6. So please send me feed back if you have any problem.
New branch works perfect for me
Thanks. :+1:
Note
From ver 0.5.0, g:jsdoc_allow_shorthand
will be deprecated.
Use let g:jsdoc_enable_es6 == 1
instead.
Looks awesome man. Thank you sooo much!
@csaroff Thx, I'll merge to master.
Merged.
I just realized that this feature breaks shorthand methods option. I opened #38
When attempting to document arrow functions I ran into this issue.
When I run :JsDoc on the following methods, the displayed JsDoc is generated.
The arrow functions do not generate parameters or method names.