rescript-association / genType

Auto generation of idiomatic bindings between Reason and JavaScript: either vanilla or typed with TypeScript/FlowType.
https://rescript-lang.org/docs/gentype/latest/introduction
MIT License
758 stars 44 forks source link

Experiment with the simplifications that supporting a single back-end would give. #562

Closed cristianoc closed 10 months ago

cristianoc commented 2 years ago

After this and other simplification, genType could be included with the compiler. Benefits include being always in sync, take advantage of infra from the compiler, and be called directly instead of spawning a separate process. So for example the error messages can become first-class.

Also, sometimes genType needs to take a conservative approach, not knowing if a function uses curry at runtime. So some unnecessary runtime conversion of values can be removed.