Generate OCaml bindings from TypeScript definitions via the TypeScript compiler API
F#
196
1,078 commits
updated Sep 11, 2026
Generate OCaml bindings from TypeScript definitions via the TypeScript compiler API.
Try out v2 beta!
npm install -g @ocsigen/ts2ocaml@beta
npm install -g @ocsigen/ts2ocaml
Or if you are using yarn:
yarn global add @ocsigen/ts2ocaml
An in-browser version may be available in future.
Goals:
.d.ts), which you can use with minimal modification.Non-goals:
keyof T or T extends U ? A : B, are simply impossible to simulate in OCaml.For users:
For developers and contributors:
This tool is heavily inspired by fable-compiler/ts2fable, which generates Fable (F# AltJS) bindings from TS definition files.
This tools is licensed under the Apache License 2.0.
F#
99.8%
Generate OCaml bindings from TypeScript definitions via the TypeScript compiler API
F#
196
1,078 commits
updated Sep 11, 2026
Generate OCaml bindings from TypeScript definitions via the TypeScript compiler API.
Try out v2 beta!
npm install -g @ocsigen/ts2ocaml@beta
npm install -g @ocsigen/ts2ocaml
Or if you are using yarn:
yarn global add @ocsigen/ts2ocaml
An in-browser version may be available in future.
Goals:
.d.ts), which you can use with minimal modification.Non-goals:
keyof T or T extends U ? A : B, are simply impossible to simulate in OCaml.For users:
For developers and contributors:
This tool is heavily inspired by fable-compiler/ts2fable, which generates Fable (F# AltJS) bindings from TS definition files.
This tools is licensed under the Apache License 2.0.
F#
99.8%