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

Does not work with async functions #99

Closed
holtc opened this issue Sep 30, 2020 · 2 comments · Fixed by #101
Closed

Does not work with async functions #99

holtc opened this issue Sep 30, 2020 · 2 comments · Fixed by #101

Comments

@holtc
Copy link

holtc commented Sep 30, 2020

Running :JsDoc on the following function does not work properly.

const doSomething = async (param1, param2, param3) => {} turns into:

/**
 * @type = {}
 */

Instead, I believe it should say the below (like it does without the async):

/**
 * doSomething.
 * @param {} param1
 * @param {} param2
 */
@heavenshell
Copy link
Owner

@holtc Thx for reporting.
This is very annoying behavior.
Currently vim-jsdoc can't judge async() {} is method or function(AST can judge but Vim script can't).
I'll try to fix this but bit hard.

Just workaround solution, you can do <Shft-v> at const doSomething line and type :'<,'>JsDoc

@heavenshell
Copy link
Owner

@holtc fixed and release as 2.1.1
Thank you for reporting this!

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

Successfully merging a pull request may close this issue.

2 participants