Skip to content

Commit d73d176

Browse files
committed
Correct comments
1 parent d015d35 commit d73d176

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

src/rcl_graph_bindings.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ Napi::Value GetInfoByTopic(Napi::Env env, rcl_node_t* node,
211211
rcl_ret_t fini_ret =
212212
rcl_topic_endpoint_info_array_fini(&info_array, &allocator);
213213
if (RCL_RET_OK != fini_ret) {
214+
Napi::Error::New(env, rcl_get_error_string().str)
215+
.ThrowAsJavaScriptException();
214216
rcl_reset_error();
215217
}
216218
});

types/node.d.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ declare module 'rclnodejs' {
719719
/**
720720
* Get this node's service names and corresponding types.
721721
*
722-
* @returns list of publishers of the names and types.
722+
* @returns An array of the names and types.
723723
* [
724724
* { name: '/start_motor', types: [ 'rplidar_ros/srv/Control' ] },
725725
* { name: '/stop_motor', types: [ 'rplidar_ros/srv/Control' ] }
@@ -728,16 +728,22 @@ declare module 'rclnodejs' {
728728
getServiceNamesAndTypes(): Array<NamesAndTypesQueryResult>;
729729

730730
/**
731-
* Get a list of publishers on a given topic.
731+
* Get an array of publishers on a given topic.
732732
*
733-
* @returns list of publishers.
733+
* @param topic - The name of the topic.
734+
* @param noDemangle - if `true`, `topic_name` needs to be a valid middleware topic name,
735+
* otherwise it should be a valid ROS topic name.
736+
* @returns An array of publishers.
734737
*/
735738
getPublishersInfoByTopic(topic: string, noDemangle: boolean): Array<object>;
736739

737740
/**
738-
* Get a list of subscriptions on a given topic.
741+
* Get an array of subscriptions on a given topic.
739742
*
740-
* @returns list of subscriptions.
743+
* @param topic - The name of the topic.
744+
* @param noDemangle - if `true`, `topic_name` needs to be a valid middleware topic name,
745+
* otherwise it should be a valid ROS topic name.
746+
* @returns An array of subscriptions.
741747
*/
742748
getSubscriptionsInfoByTopic(
743749
topic: string,

0 commit comments

Comments
 (0)