However, icu supports index lookup. For example, I could specify something like
On {1,date,::dMMMM}, there was {2} on planet {0,number,integer}.
And this will produce valid, expected results:
const mf = new MessageFormat("*");
const result = mf.compile([42, new Date("5/25/1977"), "a disturbance in the force"]);
console.log(result) // On May 25, there was a disturbance in the force on planet 42.
The type for the parameter should be Record<string, unknown> | unknown[]
MessageFunction is typed like so:
However, icu supports index lookup. For example, I could specify something like
And this will produce valid, expected results:
The type for the parameter should be
Record<string, unknown> | unknown[]