← Back to index

How to define an argument for an external function that has a hard coded value?

Sat Jul 17 2021

ReScript version: rescript@9.1.4
type t
@send external hi: (t, @as(json`true`) _, int) => unit = "hi"

let f = x => x->hi(2)

Which produces:

function f(x) {
  x.hi(true, 2);
}