We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
I can't figure out how to use fulfill with a Promise<Void>.
Promise<Void>
func doSomethingInBackground() -> Promise<Void> { return Promise<Void>(on: bgQueue) { fulfill, reject in myMoc.perform { fulfill() // compiler complains Missing argument for parameter #1 in call } } }
fulfill(nil) doesn't work either.
What is your recommendation on how to initialize an async Promise which does not have a logical return value?
Promise
The text was updated successfully, but these errors were encountered:
@bes try
func doSomethingInBackground() -> Promise<Void> { return Promise<Void>(on: bgQueue) { fulfill, reject in myMoc.perform { fulfill(()) } } }
from Swift -> Misc: public typealias Void = ()
but I don't know why fulfill(Void) don't work
fulfill(Void)
Sorry, something went wrong.
@umbri Thanks, it worked! I tried fulfill(Void) before, but as you said it does not seem to work. But fulfill(()) works.
fulfill(())
No branches or pull requests
Hi,
I can't figure out how to use fulfill with a
Promise<Void>
.fulfill(nil) doesn't work either.
What is your recommendation on how to initialize an async
Promise
which does not have a logical return value?The text was updated successfully, but these errors were encountered: