Emit [@@js.builder] if the interface is POJO (i.e. no methods)
cannorin opened this issue · comments
interface Person {
name: string;
age: number;
children?: Person[];
}
module Person: sig
type t
val create: ~name:string -> ~age:int -> ?children:t list -> t [@@js.builder]
end
Maybe we should add unsafe cast functions too?