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

Add a Computed type decorator #72

Open
ecordell opened this issue Jul 10, 2024 · 0 comments
Open

Add a Computed type decorator #72

ecordell opened this issue Jul 10, 2024 · 0 comments

Comments

@ecordell
Copy link
Contributor

We often have the case where we have some object from the cache/cluster and some "computed" form of that same object (for the sake of comparing and determining whether changes need to be applied to the cluster).

In a few places we've made type aliases i.e. type ComputedFoo Foo so that it's clear at the type level where a given object is coming from. It might be nice to have a generic annotation, i.e foo = Computed[Foo] that we can use. We may be able to use this to enforce good practice (i.e. anything passed to a write should be a Computed type, etc).

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

1 participant