package promise

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type ('a, 'e) rejectable
type never
type 'a promise = ('a, never) rejectable
type 'a t = 'a promise
val pending : unit -> 'a promise * ('a -> unit)
val resolved : 'a -> 'a promise
val exec : (('a -> unit) -> unit) -> 'a promise
val get : 'a promise -> ('a -> unit) -> unit
val tap : 'a promise -> ('a -> unit) -> 'a promise
val map : 'a promise -> ('a -> 'b) -> 'b promise
val flatMap : 'a promise -> ('a -> 'b promise) -> 'b promise
type ('a, 'e) result = ('a, 'e) Result.result
val getOk : ('a, 'e) result promise -> ('a -> unit) -> unit
val tapOk : ('a, 'e) result promise -> ('a -> unit) -> ('a, 'e) result promise
val mapOk : ('a, 'e) result promise -> ('a -> 'b) -> ('b, 'e) result promise
val flatMapOk : ('a, 'e) result promise -> ('a -> ('b, 'e) result promise) -> ('b, 'e) result promise
val getError : ('a, 'e) result promise -> ('e -> unit) -> unit
val tapError : ('a, 'e) result promise -> ('e -> unit) -> ('a, 'e) result promise
val mapError : ('a, 'e) result promise -> ('e -> 'e2) -> ('a, 'e2) result promise
val flatMapError : ('a, 'e) result promise -> ('e -> ('a, 'e2) result promise) -> ('a, 'e2) result promise
module Operators : sig ... end
val getSome : 'a option promise -> ('a -> unit) -> unit
val tapSome : 'a option promise -> ('a -> unit) -> 'a option promise
val mapSome : 'a option promise -> ('a -> 'b) -> 'b option promise
val flatMapSome : 'a option promise -> ('a -> 'b option promise) -> 'b option promise
val race : 'a promise list -> 'a promise
val all : 'a promise list -> 'a list promise
val allArray : 'a promise array -> 'a array promise
val all2 : 'a promise -> 'b promise -> ('a * 'b) promise
val all3 : 'a promise -> 'b promise -> 'c promise -> ('a * 'b * 'c) promise
val all4 : 'a promise -> 'b promise -> 'c promise -> 'd promise -> ('a * 'b * 'c * 'd) promise
val all5 : 'a promise -> 'b promise -> 'c promise -> 'd promise -> 'e promise -> ('a * 'b * 'c * 'd * 'e) promise
val all6 : 'a promise -> 'b promise -> 'c promise -> 'd promise -> 'e promise -> 'f promise -> ('a * 'b * 'c * 'd * 'e * 'f) promise
val allOk : ('a, 'e) result promise list -> ('a list, 'e) result promise
val allOkArray : ('a, 'e) result promise array -> ('a array, 'e) result promise
val allOk2 : ('a, 'err) result promise -> ('b, 'err) result promise -> ('a * 'b, 'err) result promise
val allOk3 : ('a, 'err) result promise -> ('b, 'err) result promise -> ('c, 'err) result promise -> ('a * 'b * 'c, 'err) result promise
val allOk4 : ('a, 'err) result promise -> ('b, 'err) result promise -> ('c, 'err) result promise -> ('d, 'err) result promise -> ('a * 'b * 'c * 'd, 'err) result promise
val allOk5 : ('a, 'err) result promise -> ('b, 'err) result promise -> ('c, 'err) result promise -> ('d, 'err) result promise -> ('e, 'err) result promise -> ('a * 'b * 'c * 'd * 'e, 'err) result promise
val allOk6 : ('a, 'err) result promise -> ('b, 'err) result promise -> ('c, 'err) result promise -> ('d, 'err) result promise -> ('e, 'err) result promise -> ('f, 'err) result promise -> ('a * 'b * 'c * 'd * 'e * 'f, 'err) result promise
module Js : sig ... end
module PipeFirst : sig ... end
val onUnhandledException : (exn -> unit) ref
module ReadyCallbacks : sig ... end
OCaml

Innovation. Community. Security.