From TypeScript To ReScript (blog post)

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:

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

1 Like

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.

1 Like

Thanks for the info, I just fixed the link!

P.S. There are hot discussions on Hackernews :slight_smile: From TypeScript to ReScript | Hacker News

1 Like

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")}
1 Like

Here’s this project that built an ts to ocaml lib. They said they’re looking to expand to other languages.

Someone’s already working on generating to rescript.