The sintax for optional arguments is different for signatures and actual implementation. You don’t specify the option part in the signature.
module M: {
let f: (~a: int=?) => unit
} = {
let f = (~a: option<int>=?) => {
()
}
}
M.f(~a=1)
You can read more about signatures and type annotations for functions with labeled arguments here.