Repromise — JS promises made type-safe for ReasonML


#1

Repromise is a binding to JS promises, now in NPM! It is an alternative to Js.Promise that ensures type safety while preserving interop. The full docs are here.

Basically, what Repromise does is:

  • reuse the existing promise objects from JS,
  • replace JS promise functions (resolve, etc.) with new, type-safe versions.

That means all JS libraries that return promises already work with Repromise, and we can take advantage of existing promise tooling in the JS community.

Besides that, Repromise also has:

These are still unreleased. In the coming weeks, we will integrate native Repromise with Lwt, and, eventually, with libuv.

Ultimately, we would like to upstream Repromise into BuckleScript. We are releasing Repromise standalone first, because that way it will develop faster :slight_smile: So please try it out, join us in the bikeshedding issue, give your opinion on error handling, and help make JS promises pleasant to use :slight_smile:



#2

@antron Congrats on the release and thanks so much for your hard work pushing things forward! :beers: