Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

single value enum and API pattern #304

Closed
dontcallmedom opened this issue Nov 27, 2024 · 2 comments
Closed

single value enum and API pattern #304

dontcallmedom opened this issue Nov 27, 2024 · 2 comments

Comments

@dontcallmedom
Copy link
Member

Following #300 the PressureSource enum has a single value; I understand the goal is to keep thermals as a possible future extension, but conversely, it would be unfortunate if such a future extension never sees the light and developers have to keep using observe("cpu") for ever for no good reason.

I wonder if this points toward a possible alternative structure for the API, where observe() would be applied to an object representing the source (e.g. cpu.observe()).

@kenchris
Copy link
Contributor

We do want to expand this to other types in the future, and this is already shipping in Chrome and Edge, so that would be a major change. Also we are trying to avoid having too many objects in the platform.

@dontcallmedom
Copy link
Member Author

ok, thanks; no need to keep the issue open then

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

No branches or pull requests

2 participants