Skip to content

Conversation

@minggangw
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings January 14, 2026 10:07
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request corrects the return type of the Time.toMsg() method to return JavaScript numbers instead of bigints for the sec and nanosec fields, aligning with ROS2's builtin_interfaces.msg.Time message specification which uses int32 for sec and uint32 for nanosec.

Changes:

  • Modified Time.toMsg() to convert bigint values to numbers using Number()
  • Updated test expectations to verify numbers are returned instead of bigints
  • Added test case verifying Time.fromMsg() compatibility with number types

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
lib/time.js Wraps sec and nanosec with Number() to convert from bigint to number in toMsg()
test/test-time.js Updates assertions to expect numbers and adds type verification; adds test for fromMsg() accepting number inputs

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coveralls
Copy link

Coverage Status

coverage: 85.565% (+0.02%) from 85.544%
when pulling ee51d38 on minggangw:fix-1370
into 94a1728 on RobotWebTools:develop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants