You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could somebody provide an example of how to use JSPromise(resolver:)? I'm having hard time decoding the following comment in the source code:
Creates a new JSPromise instance from a given resolver closure. resolver takes two closure that your code should call to either resolve or reject this JSPromise instance.
The text was updated successfully, but these errors were encountered:
Those docs look to be outdated. (if you could open a PR to clarify them that would be awesome!) You’re actually passed one callback closure that takes a Result type. If you pass it a .success(...) value, the promise will resolve with that value. If you pass it a .failure(...) value, the promise will reject with that error.
Could somebody provide an example of how to use
JSPromise(resolver:)
? I'm having hard time decoding the following comment in the source code:The text was updated successfully, but these errors were encountered: