In Rescript, one can define a Record
in this format:
type record1 = {
a : String
}
but NOT:
type record2 = {
[a] : String
}
I am looking to write a record that compiles to JS like:
{
[Op.or]: [12,13]
}
The use case above comes from Sequelize
, and the reference is here.
My current solution:
%raw(`{[Op.or]:[12,13]}`)