by jatins · 4y ago · 0 comments
Providing type declarations for every third party lib you might want to use, especially in an ecosystem like Javascript's which relies heavily on them, gets tiring pretty fast.
Typescript manages to get past that because it has reached a level of adoption now that most popular libraries will have a @types/<lib> package also but it took a long while to reach that stage.
Curious if anyone has used ReScript at a larger scale (and does not have the resources of, say, Facebook) and what's their experience been like.
Former coworkers have messaged me saying that they miss writing ReScript and wish they could convince their team.
We have about 1200 ReScript files on both front-end/back-end. It's great. It feels much safer to refactor and write new code.
We use TypeScript in some places, like TypeORM and we're able to consume those types on the Rescript side. Rescript generates and consumes typescript types via gentype.
I'd strongly recommend you try it!
If you need to add types to a JS library that still doesn’t have them for some reason, you’re actually doing less work than if you didn’t add them.
Add the types as needed and you’re good.
[0] https://www.typescriptlang.org/docs/handbook/2/template-lite...