Closed aappddeevv closed 7 years ago
Just do this, and it automatically lifts all of the Promise[T]'s to Future[T]'s
import io.scalajs.util.PromiseHelper.Implicits._
I agree with @aappddeevv. In Scala, a Promise
is an implementation detail, and should never be seen in a public signature. The normal result type is Future
.
I'll change this in version v0.4.0-pre5. Should have a new release by Monday or Tuesday night.
Fixed in release v0.4.0-pre5
I noticed that the fs *Async functions all return scala Promises vs Futures. Since I always need to compose these, why not return Future in the API since its not node.js standard anyway? The completion is always handled within the function so there never really is anything you can do with it. I know its just a aPromse.future to get the Future but you cannot do much with the returned promise as is. Was there a reason for returning a scala Promise?