I want to directly compare two JS Temporals. I can convert them to bigints and in JS I could use the less than operator: t1 < t2. I know there is compare, but looking at the generated JS, that goes through a bunch of Caml functions. Is there a zero-cost way to use JS’s built-in less-than operator?
A temporal is a new browser API to get fix some of the issues of Dates. It has nanosecond support vs millisecond for Dates. See Temporal documentation. Rescript-webapi has some bindings in a PR, not yet merged.
I went with using raw for now. Feels odd that that’s the best approach, given Rescript’s goal of zero-cost bindings, but it certainly works.