How to ues rescript to describes Union Type objects from js/ts

Is it possible to describe an object of type Record<string, string | number | boolean > from the js/ts library with the rescript type.
I can’t predict the key for that input so I should use Js.Dict.t, but I can’t think of a suitable 'a to describe all the possibilities. The first step in rescript for this input would be a check function to verify that this input type meets expectations. For the data after this step of checking and conversion I know how to use the rescript type description
If an accurate description is not possible, what are the best practices for such inputs?

1 Like

Yes, in ReScript v11 this is easy with untagged variants:

The playground doesn’t have rc.4 yet so I added | as(true) True | @as(false) False to handle booleans, but with rc.4 you’ll be able to simply do Boolean(bool).