RobotWebTools / rclnodejs

Node.js version of ROS 2.0 client
https://docs.ros.org/en/humble/Concepts/Basic/About-Client-Libraries.html?highlight=rclnodejs#community-maintained
Apache License 2.0
320 stars 70 forks source link

fix: ActionServer CancelCallback type definition #833

Closed wayneparrott closed 2 years ago

wayneparrott commented 2 years ago

The internal actionserver code treats the cancelcallback as an awaitable object. Yet the CancelCallback type definition specifies only a return type of CancelResponse. The proper CancelCallback function definition should return a union of CallbackResponse or a Promise that resolves to a CallbackResponse.

This fix is related to fix #831 contributed by @JGAntunes

coveralls commented 2 years ago

Coverage Status

Coverage remained the same at 90.471% when pulling 3c775ad951c320b8fd9cd0254d7b27615463bda3 on wayneparrott:develop into 8d23878f62e8c90feb8aadec2a6c062a04fa2198 on RobotWebTools:develop.