How to covert int to unsigned int?

As titled. It is seemingly easy in js with -23456>>>0

I’ve found asr function but it translates into x>>0 (shift right), which it supposed to. How can I do x>>>0 (unsigned right shift) in ReScript?

Thanks,

after some digging, I came up with this:

let int32ToUint32 = x => {
  open Js.TypedArray2
  Uint32Array.make([x])->Uint32Array.unsafe_get(0)
}

lsr (logical shift right) translates into >>>

3 Likes