We’re pleased to announce that ts2ocaml is now public!
This is a tool which parses TypeScript definition files (
.d.ts) of a JS package and then generates an OCaml binding for the package.
ts2ocaml currently supports js_of_ocaml as a target via LexiFi/gen_js_api, and ReScript is also going to be supported too!
You can install ts2ocaml from NPM:
npm install -g @ocsigen/ts2ocaml.
Please take a look at the documentation on our GitHub repository before using it.
Also, we appreciate any feedback or bug reports, especially since this is the first release of ts2ocaml!
This tool is heavily inspired by ts2fable, which generates Fable (F# AltJS) bindings from
.d.ts files. This tool is also written in Fable. Thank you very much for the great language and an awesome ecosystem, Fable team!