-
Notifications
You must be signed in to change notification settings - Fork 34
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
Remove async
prefix from JSDOC?
#39
Comments
We were thinking about that. But I think it may be hard to describe that the |
|
We don't have to use wordy phrasing just because we formally write |
We can't. We should use JSDOC notation |
Plus: it's not true that we return e.g. |
If we change the phrase 'returns a Promise that returns a list' to 'returns a list through a Promise' - do we really break a notation? |
@VasilyStrelyaev you don't get it. We don't have phrases, we can use just types, e.g.: |
we must be discussing different things... |
@VasilyStrelyaev then can you clarify your statement pls ) |
@inikulin ok, then... |
@VasilyStrelyaev I thought we were talking about return type which is the subject of debate in this issue. |
@inikulin yep, and then @AlexanderMoskovkin expressed a doubt that we can convey everything with a return type. Which, my point, is not a problem if (a) our return type is formally correct and (b) we add a clear description. |
I'm wondering should we remove
async
prefix from JSDOC and use@returns Promise<T>
instead?For me it's seems more semantically correct. Moreover, in client code we don't have
async
funcs and for the non-ES6 code (e.g. in tests) this funcitons looks like regular funcs which returns Promises.\cc @AndreyBelym @AlexanderMoskovkin @VasilyStrelyaev
The text was updated successfully, but these errors were encountered: