Skip to content

Commit 77e4e12

Browse files
committed
Revert rename of connection event
1 parent ede2397 commit 77e4e12

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "roslib",
33
"homepage": "https://robotwebtools.github.io",
44
"description": "The standard ROS Javascript Library",
5-
"version": "2.0.0-alpha5",
5+
"version": "2.0.0-alpha6",
66
"license": "BSD-2-Clause",
77
"files": [
88
"dist"

src/core/Ros.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ export interface TypeDefDict {
4242
* Manages connection to the rosbridge server and all interactions with ROS.
4343
*
4444
* Emits the following events:
45-
* * 'open' - Connected to the rosbridge server.
45+
* * 'connection' - Connected to the rosbridge server.
4646
* * 'close' - Disconnected to the rosbridge server.
4747
* * 'error' - There was an error with ROS.
4848
* * <topicName> - A message came from rosbridge with the given topic name.
4949
* * <serviceID> - A service response came from rosbridge with the given ID.
5050
*/
5151
export default class Ros extends EventEmitter<
5252
{
53-
open: [TransportEvent];
53+
connection: [TransportEvent];
5454
close: [TransportEvent];
5555
error: [TransportEvent];
5656
// Any dynamically-named event should correspond to a rosbridge protocol message
@@ -101,7 +101,7 @@ export default class Ros extends EventEmitter<
101101

102102
transport.on("open", (event: TransportEvent) => {
103103
this.#isConnected = true;
104-
this.emit("open", event);
104+
this.emit("connection", event);
105105
});
106106

107107
transport.on("close", (event: TransportEvent) => {

0 commit comments

Comments
 (0)