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

[Observation] Proposal to add a transactional observation of values #2726

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

phausler
Copy link
Contributor

@phausler phausler commented Mar 5, 2025

This proposal contains a modification to the Observation module that adds a new type. This type is an AsyncSequence that produces values over time by tracking transactional changes to @Observable marked types.

Copy link
Member

@heckj heckj left a comment

Choose a reason for hiding this comment

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

fixes a few grammar typos

`AsyncSequence` of values emitted from changes to a property on a given model
type. For example, DockKit provides `trackingStates` and Group Activities
provides `localParticipantStates`. These are much like other APIs that provide
`AsyncSequence` from a model type; they hand crafted to provide events from when
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
`AsyncSequence` from a model type; they hand crafted to provide events from when
`AsyncSequence` from a model type; they are hand crafted to provide events from when

prime for the next call to the iterator's `next` method.

The closure has two other features that are important for common usage; firstly
the closure is typed-throws such that any access to that emission closure will
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
the closure is typed-throws such that any access to that emission closure will
the closure uses typed-throws such that any access to that emission closure will

@rjmccall rjmccall added the LSG Contains topics under the domain of the Language Steering Group label Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LSG Contains topics under the domain of the Language Steering Group
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants