The @meth
decorator is used to call a function on a JavaScript object,
and avoid issues with currying.
Suppose we have the following JavaScript:
JS
function say(a, b) {
console.log(a, b);
}
var john = {
say,
};
We can model and bind to this object as follows.
type person = {@meth "say": (string, string) => unit}
@val external john: person = "john"
john["say"]("hey", "jude")