Skip to content

Commit 626f5ec

Browse files
committed
Revise jsdoc comments
1 parent 4788873 commit 626f5ec

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

types/node.d.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
declare module 'rclnodejs' {
22
/**
3-
* Identifies type of ROS message such as msg or srv.
3+
* Identifies a ROS message, service or action type.
4+
*
5+
* A type can be supplied in any of the following forms:
6+
* - a constructor returned by {@link require | rclnodejs.require(...)} — for a
7+
* message (e.g. `std_msgs/msg/String`), a service (with `Request`/`Response`)
8+
* or an action (with `Goal`/`Feedback`/`Result`). This form is fully typed:
9+
* the concrete message types are inferred for callbacks, requests, responses,
10+
* goals, feedback and results.
11+
* - a string, e.g. `'std_msgs/msg/String'`. Also fully typed.
12+
* - an object descriptor, e.g. `{package: 'std_msgs', type: 'msg', name: 'String'}`.
13+
* Supported at runtime but not statically resolvable, so it falls back to
14+
* `object`. Prefer the string or constructor form for full type safety.
415
*/
516
type TypeClass<T = TypeClassName> =
617
| (new (...args: any[]) => any) // a message class constructor, e.g. the value returned by rclnodejs.require('std_msgs/msg/String')

0 commit comments

Comments
 (0)