Add BigInt reading support
jtbandes opened this issue · comments
Jacob Bandes-Storch commented
Not all values of int64
and uint64
types can be represented in plain Numbers in JS. We currently use int53 which just logs a console.assert
error if the number is out of range, but doesn't prevent returning an incorrect value. The new BigInt type can be used instead, but this should be an opt-in feature because it's not source compatible (for instance, 1n + 2
is a type error).
Chunan(Jason) Ye commented
Is there any updates on this issue? If you haven't started working on it, I might be able to contribute since I have a project running into this problem right now.
Jacob Bandes-Storch commented
Please check out @foxglove/rosbag
(and @foxglove/rosmsg
) which support bigints natively.