js_of_ocaml icon indicating copy to clipboard operation
js_of_ocaml copied to clipboard

Implement jsoo constructor deriver.

Open Drup opened this issue 10 years ago • 1 comments

Self reminder for the second part of https://github.com/ocsigen/js_of_ocaml/pull/239#issuecomment-83037593. Here was the description:

  • A deriver would provide the ability to define "object constructors":
type t = < foo : int prop ; bar : int Js.optdef prop > Js.t
[@@deriving jsoo.constructor]

would define a function of type:

?bar:int -> ~foo:int -> unit -> t 

Drup avatar Aug 17 '15 14:08 Drup

could be used to implement #801 maybe ..

hhugo avatar Jan 11 '22 09:01 hhugo