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?
Overall it can feel like maintaining both .res and .resi files is cumbersome and implies repeating yourself but in a real world use case, it’s really great, you can immediately see just looking at the modified files in a PR if your API changed or if it’s just internal, etc, it allows to hide internal types and functions, it’s pretty cool.