Skip to content

Conversation

@EzraBrooks
Copy link
Collaborator

Public API Changes

none

Description

Routed out another few bits of weirdness by statically typing the event interfaces of each class. Funnily enough, this revealed that some of them were just not being used at all and could be removed.

@EzraBrooks EzraBrooks requested review from bjsowa and sea-bass November 7, 2025 20:39
handleMessage(message: RosbridgeMessage) {
if (isRosbridgePublishMessage(message)) {
this.emit(message.topic, message.msg);
this.emit(message.topic, message);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly curious about this one -- was it a bug?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a bug as much as a weird layer of indirection - you can see in Topic that it was (internally, not exposed to users) behaving slightly differently than the other classes. It was handling just the inner msg member instead of the whole message from rosbridge. By moving the place where .msg was being accessed, the API became consistent.

This rooted out another few bits of weirdness.
@EzraBrooks EzraBrooks force-pushed the statically-typed-events branch from 3ca9d39 to 1ab4df6 Compare November 7, 2025 22:09
@EzraBrooks EzraBrooks enabled auto-merge (squash) November 7, 2025 22:09
@EzraBrooks EzraBrooks merged commit 343c121 into develop Nov 7, 2025
3 checks passed
@EzraBrooks EzraBrooks deleted the statically-typed-events branch November 7, 2025 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants