melange-re / melange

A mixture of tooling combined to produce JavaScript from OCaml & Reason
https://melange.re
Other
846 stars 52 forks source link

support mel.unwrap in `@@deriving jsProperties` #1159

Open anmonteiro opened 3 months ago

anmonteiro commented 3 months ago
type t = {
  action : [ `String of string | `Int of int ] option;
      [@mel.unwrap] [@mel.optional]
}
[@@deriving jsProperties, getSet]

let x = t ~action:(`String "x")