Is there a way to represent JS template literals in type annotations?


#1

I’m using an internationalization library in JS (https://github.com/format-message/format-message) which contains a function that takes a template literal and an object. The template literals don’t have any interpolated JS variables, but the text has to be wrapped in backticks rather than quotes e.g. when translating ICU-formatted plural variants. Is there a way to type-check template literal parameters of external functions in ReasonML?


#2

Got a response to this question here.