Skip to content
This repository was archived by the owner on Feb 5, 2023. It is now read-only.

FutureX 0.17

Compare
Choose a tag to compare
@kean kean released this 07 Apr 11:32

Refined on method to attach callbacks. There are just two minor changes:

  • Completion closure signature is now () -> Void instead of (Result) -> Void. Completion is designed to be used in addition to success and failure to do things like hiding activity indicators. That's why the Result variant never really made sense. If you'd like to use Result instead, use future.materialize().on { result in }.
  • Add a func on(success: (Value) -> Void) method. Now future.on { } (with a trailing closure) is inferred by the compiler to add success closure. Previously, it used to attach completion closure. This change makes it a little bit nices to attach callbacks to futures that can't produce errors (Future<_, Never>).

There is also a change in the project structure. We now use a single multi-platform target instead of four separate targets - one for each platform.