Skip to content

Conversation

@micheal-parks
Copy link
Member

Overview

It's often useful to read the corresponding resource name from a client, for example when executing requests on the robotClient in a scope where only a resource client and not the original resource name is available. In this PR I've switched all names to public but kept the readonly modifier.

@micheal-parks micheal-parks requested a review from a team as a code owner February 18, 2025 19:59
Copy link
Contributor

@zaporter-work zaporter-work left a comment

Choose a reason for hiding this comment

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

I'm in favor of this change -- svelte-sdk has to pair clients and their names together. If this info was on the client, it would simplify our code.

Are there any downsides to this?

@micheal-parks
Copy link
Member Author

micheal-parks commented Feb 18, 2025

I don't see any. It's still readonly, and the user knows the name of the client when passing it to the constructor. This is useful metadata that should be made available IMO. In non-ts-land people can already read (and change) this value since all modifiers are compiled away.

Copy link
Member

@stuqdog stuqdog left a comment

Choose a reason for hiding this comment

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

seems reasonable to me!

@micheal-parks micheal-parks merged commit 889d5d7 into viamrobotics:main Feb 24, 2025
3 checks passed
@micheal-parks micheal-parks deleted the make-name-public branch February 24, 2025 16:39
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