Skip to content

Conversation

@minggangw
Copy link
Member

@minggangw minggangw commented Apr 30, 2025

This patch adds typescript interface for the newly added functions, see #1106 #1108

Fix: #1113

@minggangw minggangw requested a review from Copilot April 30, 2025 10:00
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 PR introduces TypeScript interface tests for several new functions in rclnodejs. Key changes include:

  • Adding a new constant (SERVICE_NAME) for service-related tests.
  • Introducing type validations for new Context, Node, and Timer functions.
  • Adding tests to verify the return types of functions like countClients, countServices, changeTimerPeriod, timerPeriod, and callTimerWithInfo.

expectType<void>(timer.cancel());
expectType<void>(timer.changeTimerPeriod(BigInt(100000)));
expectType<bigint>(timer.timerPeriod());
expectType<object>(timer.callTimerWithInfo());
Copy link

Copilot AI Apr 30, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider using a more specific interface type for 'timer.callTimerWithInfo()' instead of the generic 'object', to enhance type safety and clarity.

Copilot uses AI. Check for mistakes.
@minggangw minggangw merged commit 5dc2276 into RobotWebTools:develop Apr 30, 2025
7 checks passed
minggangw added a commit that referenced this pull request Apr 30, 2025
This patch adds typescript interface for the newly added functions, see #1106 #1108

Fix: #1113
@coveralls
Copy link

Coverage Status

coverage: 85.071%. remained the same
when pulling 0d09af3 on minggangw:add-typescript-interfaces
into 131ebf8 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.

Add typescript interface for the added new functions

2 participants