In kotlin-multiplatform targeting js, Long values ...
# announcements
p
In kotlin-multiplatform targeting js, Long values are represented as an object containing the top and bottom 32 bits of the value as separate fields ({low: lowbits, high: highbits, value: zzzzzzzzzz}) . Is there any way to hint to the compiler that the values are less than Number.MAX_SAFE_INTEGER, and that they should be represented in javascript as a bare Number, or to otherwise pass a number greater than 1<<31 back into native javascript code?
c
why not use Int?
on never mind, integers in js are bigger than ints in java and kotlin
p
yupyup
or rather, js doesn’t have integers. It has doubles, only.