You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rclnodejs currently seems to detect if a 64bit integer is greater than Number.MAX_SAFE_INTEGER and returns either a number or a string depending on if it is or not. This was originally tracked by #103 which was before bigint was introduced. It would be nice to use the new native type rather than changing the type that can be returned.
See below. Ran ros2 topic pub with std_msgs/Int64 data type and printed out the message and the type of the data field. Changed the published value between Number.MAX_SAFE_INTEGER and one slightly larger.
Got Message: {"data":"9007199254740993"}
Type: string
Got Message: {"data":9007199254740991}
Type: number
The typescript message definitions also do not indicate that the data field can be a string.
The text was updated successfully, but these errors were encountered:
rclnodejs
currently seems to detect if a 64bit integer is greater thanNumber.MAX_SAFE_INTEGER
and returns either a number or a string depending on if it is or not. This was originally tracked by #103 which was beforebigint
was introduced. It would be nice to use the new native type rather than changing the type that can be returned.See below. Ran
ros2 topic pub
withstd_msgs/Int64
data type and printed out the message and the type of thedata
field. Changed the published value betweenNumber.MAX_SAFE_INTEGER
and one slightly larger.The typescript message definitions also do not indicate that the data field can be a string.
The text was updated successfully, but these errors were encountered: