Module Js.UndefinedSource

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

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

Sourceval getUnsafe : 'a t -> 'a
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 testAny : 'a -> bool

Requires JS runtime type tags: natively there is no way to check whether an arbitrary value is undefined.

  • alert not_implemented is not implemented in native under server-reason-react.js
Sourceval fromOption : 'a option -> 'a t
Sourceval from_opt : 'a option -> 'a t