I’m very new to reasonml/rescript community, What I know genType generates TS/flow types from rescript component while working in existing Typescript/flow codebase. Is there any other way around like I’m working on existing rescript codebase, does it generates bindings for rescript from typescript component/library types?
I think we won’t ever be able to fully automate this task, but a semi-automated way is often good enough. The most promising tool out there is ts2ocaml, which has an open PR for ReScript bindings. Still a lot of work open though, and I guess they are also waiting for some advances in the compiler repository.
Maybe the author @cannorin can shed some more light on its state.
It’s about 70% done, as it can generate something that looks like a valid ReScript code, and it’s time to generate a lot of bindings and feed them to the compiler to see what happens.
Small update: ReScript v10 is now out (pre-release) and I’m now doing the aforementioned mass testing with it.
I can confirm v10 is able to compile the output of ts2ocaml! It would still need some more work before releasing it but at least it’s not going to be a vaporware