package promise_jsoo

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
val from_catch : 'a t -> ('a, error) Stdlib.result t

from_catch p catches any rejections on the promise p and resolves it to Error reason, or Ok value when the promise is fulfilled

val return : 'a -> ('a, 'e) Stdlib.result t
val map : ('a -> 'b) -> ('a, 'e) Stdlib.result t -> ('b, 'e) Stdlib.result t
val bind : ('a -> ('b, 'e) Stdlib.result t) -> ('a, 'e) Stdlib.result t -> ('b, 'e) Stdlib.result t
val iter : ?ok:('a -> unit) -> ?error:('b -> unit) -> ('a, 'b) Stdlib.result t -> unit t
module Syntax : sig ... end