fix(WebView): event types by cem2ran · Pull Request #608 · rescript-react-native/rescript-react-native
We have the same issue with syntheticEvent and responderSyntheticEvent in Event.re and I've been holding off for inherited fields @cem2ran This is greatly appreciated, I hadn't looked into OO with OCaml in any detail. I had seen @glennsl recommend against classes and not delved further seeing the camlinternalOO.js import. That seems to be only the case when there are methods inside the class, so it was a misjudgment on my part. There is simply no overhead.
Perhaps one strike against adopting class types might be the lack of documentation. I still can't find anything further on e.g. private in Reason or BuckleScript documentation - despite knowing now to look for it. One has to refer to OCaml documentation and use the parser to figure out Reason syntax.
The PR to add inherited fields simply loops the parser for objects (Ptyp_object). I don't think that's an implicit use of classes (Ptyp_class) but I might be misinterpreting the code.
I've been working on the spin-off WebView bindings (PR is almost ready) and was looking at the TS bindings as you have (documentation is sometimes incorrect), but I decided to simply duplicate fields for now. I will mirror our decision in the main repo.