Hi,
as some of you already know I did complete rewrite of my pet project from TypeScript to ReScript.
I just published a blog post, where I’ve tried to summarize my experience:
https://www.greyblake.com/blog/from-typescript-to-rescript/
Unfortunately, there is nothing that would convert type definitions
from TypeScript to ReScript, because TypeScript's type system
is much more complex than ReScript's one.
we can write bindings in a typesafe way. ie if we write a binding which is not similar to the respective typescript type then we would get a compile error in .gen.tsx
I have showed it in this video https://youtu.be/dr1PskGSdU4?t=656
Great article!
I added it to the awesome-rescript repo.
EDIT: @greyblake I think that the “BuckleScript & Reason Rebranding” link is wrong, it leads to the genType docs.
Thanks for the info, I just fixed the link!
P.S. There are hot discussions on Hackernews From TypeScript to ReScript | Hacker News
Some nitpick: The @react.component
is not the thing which “allows to use JSX-like syntax”.
You can write JSX in a render function without any annotation just fine:
let renderMyLink = () =>
<Link href target="_blank" rel="noopener" underline=#hover>
{React.string("my link")}
</Link>
Here’s this project that built an ts to ocaml lib. They said they’re looking to expand to other languages. https://github.com/ocsigen/ts2ocaml
Someone’s already working on generating to rescript.