title: How to use List, Map, etc. from TypeScript
body: <p>I have a combo ReScript and TypeScript project. I want to use <code>gentype</code> to expose TypeScript friendly objects. Gentype works for string, bool, records, and other basic objects without any hassles. How can I work with <code>list</code> and <code>char</code> and other ReScript-specific types from TypeScript?</p>
  <p>There is a shims feature but I don't know how to do that. I would assume there are built-in shims for the standard Belt library but can't find them.</p>
  <p>I plan to do most of the calculations and heavy-lifting inside Rescript. So when the info is sent to TypeScript, I'll probably just be consuming the data, not modifying it. This might be iterating through a list to display the contents in a non-Rescript React project. I don't plan to manipulate the data.</p>
  <p>One option is to convert lists to arrays inside ReScript before exporting the results. So any time I want to consume information from TypeScript, I'll create a function and/or type in ReScript that only has bool, number, string, array, and object. I could create an &quot;interop&quot; module with all the stuff I want to consume or use from TypeScript. This provides a clean separation between the ReScript and TypeScript world and is easy to get my head around but seems a little inefficient (like converting all lists to arrays) and extra work.</p>
  <p>On the other hand, if using the Belt objects like list and map is cumbersome from TypeScript, even with the shims, then I'm probably better off creating my &quot;interop&quot; module anyway.</p>
  <p>What is the recommended/simplest/best way to use list, map, char, and other ReScript specific objects from within TypeScript? Are there friendly Typescript definitions for the Belt standard library that I could use even if I wasn't using ReScript?</p>
  <p>===</p>
  <p>One additional note. I have experience trying to use F# (functional) from C#. It was painful. The best solution for me in that environment was to create an interface on the F# side that was easily consumable on the C# side that did not use the F# native objects.</p>