Module Js.NullSource

Sourcetype 'a t = 'a option
Sourceval toOption : 'a t -> 'a option
Sourceval fromOpt : 'a option -> 'a t
Sourceval empty : 'a option
Sourceval return : 'a -> 'a option
Sourceval getUnsafe : 'a t -> 'a
Sourceval getExn : 'a t -> 'a
  • raises Js_exn.Error

    with message "Js.Null.getExn" when the value is empty, like Melange.

Sourceval map : f:('a -> 'b) -> 'a t -> 'b t
Sourceval bind : f:('a -> 'b t) -> 'a t -> 'b t
Sourceval iter : f:('a -> unit) -> 'a t -> unit
Sourceval fromOption : 'a option -> 'a t
Sourceval from_opt : 'a option -> 'a t