Consider the following code:
open Js_of_ocaml
class type message_port =
object ('self)
(* these types are wrong; fix them later *)
method postMessage : unit Js.meth
method start : unit Js.meth
method close : unit Js.meth
end
class type message_channel =
object ('self)
method port1 : message_port Js.t Js.readonly_prop
method port2 : message_port Js.t Js.readonly_prop
end
Ignore the incorrect message bindings on message_port; I will fix those later.
Here is my question: given MessageChannel - Web APIs | MDN , should the type signatures on port1/port2 be:
message_port Js.t Js.readonly_prop
or message_port Js.readonly_prop
– and why ?
Note the lack of Js.t
in the latter.