Skip to content

Commit a6a2d48

Browse files
committed
Address comments
1 parent d34a15f commit a6a2d48

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/npmjs-readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ TypeScript example:
5858
```typescript
5959
import * as rclnodejs from 'rclnodejs';
6060
rclnodejs.init().then(() => {
61-
const node = new rclnodejs.Node('publisher_example_node');
61+
const node = rclnodejs.createNode('publisher_example_node');
6262
const publisher = node.createPublisher('std_msgs/msg/String', 'topic');
6363
publisher.publish(`Hello ROS 2 from rclnodejs`);
64-
node.spin();
64+
rclnodejs.spin(node);
6565
});
6666
```
6767

0 commit comments

Comments
 (0)