Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@vasilmkd
Copy link
Contributor

@vasilmkd vasilmkd commented Mar 17, 2020

Resolves #2881.

In line with the Scala.js recommendations: https://www.scala-js.org/api/scalajs-library/1.0.1/scala/scalajs/js/Promise.html

@regiskuckaertz as original issue author.

@regiskuckaertz
Copy link
Member

Amazing ❤️ I looked into the code on Scala JS, the toFuture does not seem like it is doing too much: https://github.com/scala-js/scala-js/blob/bbf3629faedb59a260d39f961bc75b31ff3821a9/library/src/main/scala/scala/scalajs/js/Thenable.scala#L54-L70

Do you have bandwidth to convert this using ZIO's own Promise?

@vasilmkd
Copy link
Contributor Author

Thanks. Will do.

@vasilmkd
Copy link
Contributor Author

@regiskuckaertz How about now, I think it's even more straight to the point.

@vasilmkd
Copy link
Contributor Author

@regiskuckaertz Could you please take another look? Thanks.

@regiskuckaertz
Copy link
Member

Sorry for the lack of feedback. Thanks again for doing this, there's one minor nit then it looks great to me 👍

Co-Authored-By: Regis Kuckaertz <[email protected]>
@vasilmkd
Copy link
Contributor Author

No problem, I committed your suggestion.

@regiskuckaertz regiskuckaertz merged commit 083a2fc into zio:master Mar 27, 2020
@vasilmkd vasilmkd deleted the js-promise-interop branch March 27, 2020 22:13
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 this pull request may close these issues.

Add a JS-specific interop layer for promises

2 participants