I’d like to share a ppx I’ve been working on to help us build frontends with JSOO at Skolem as well as a blog post to accompany it.
let concat (s1 : string) (s2 : string) : string = s1 ^ s2 [@@expjs]
Welcome to Node.js v16.13.0. Type ".help" for more information. > const my_module = require("./_build/default/my_module.bc.js"); undefined > x.concat("Hello ", "World") "Hello World" >
(note there is no need to use either
I’ve written a blog post that describes why one might find this ppx useful and how it works, which can be found here.
Currently there’s no official release of the ppx on OPAM, but if you would like to install it you can run
opam pin add ppx_expjs https://github.com/skolemlabs/ppx_expjs.git