I am trying to interop with a typescript project. I want to export a rescript function as a curried function. Something like below.
@gentype
let fn = (a, b) => {
(c, d) => // Some action here
}
This didnt work first. So I rewrote it like below. So rescript compiler, compiles it into a curried function.
let identity = a => a
@gentype
let fn = (a, b) => {
let sameA = a->identity
(c, d) => // Some action here
}
This gets compiled to curried function correctly. However gentype creates the type of function as uncurried. Something like below.
type fn = (a: A, b: B, c: C, d: D) => R
But it should be created like Below
type fn = (a: A, b: B) => (c: C, d: D) => R
Please advise.