-
Notifications
You must be signed in to change notification settings - Fork 793
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
co handling of return value #298
Comments
@tj your short answer would be highly relevant. |
let result = yield browser;
return result; |
@DeShadow you've misunderstood me. I was talking about returning |
@jakwuh I understand. I try to say that it's not possible. Because You can write I don't know, how to help you :( |
@DeShadow I got you. Seems like this is the only possible solution for now. Thank you for the response. |
I wonder why
co
yields return value by default.This is an example:
In the case when
browser
object hasthen
method,co
tries to resolve it, but I (obviously in this case) do not want such a behaviour. I know thatco
simply passes return value to Promise resolve callback, but implementation can be changed if needed.Basically, I want to decide on my own if I need the returned value to be resolved as a promise. This could be achieved with such a syntax:
Will be very thankful for any feedback on this issue.
The text was updated successfully, but these errors were encountered: