Asking ReScript what it thinks a type is?

Is there a construct or syntax in ReScript that would ask the compiler what type it thinks an expression has? Maybe something like typed holes?

Hi

If I have understood you right. You don’t know what the correct type is and you want to find out what it is. The usual trick I use is to assign a random type to it say string . The compiler would complain with the type mismatch.

3 Likes

Thanks, I’ll try that.