points
The link below shows how it can work for Ocaml <-> TypeScript.
https://github.com/ocsigen/ts2ocaml