Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 1819

Why do `.resi` and `.res` files require defining records twice (once in each file)?

$
0
0

I tried using a .resi file to help hide an external I didn’t want any code to have access to, but I personally found it annoying having to copy-and-paste the same type definition for a record in both the .resi and .res file.

The docs and compiler didn’t suggest a way to define the record once in the .resi file and then access it in the .res file. Am I missing something? And if not, what’s the design thinking about having to repeat the record definition?


Viewing all articles
Browse latest Browse all 1819

Trending Articles