Merged
Conversation
Introduce `Observation+Ext.swift` to extend `Observable` objects with a `stream` method for keyPath-driven value observation using `AsyncStream`. This feature enables observing changes in observable objects more conveniently, particularly in asynchronous contexts. Additionally, `AsyncStream` is extended to include an `until` method, allowing iteration to continue until a specified value is encountered, improving testing capabilities. With these changes, new unit tests are created in `ObservationTests.swift` to ensure that the observable streams function correctly. Also, update `Package.swift` to support macOS version 14, ensuring broader adoption and compatibility with recent macOS features.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce
Observation+Ext.swiftto extendObservableobjects with astreammethod for keyPath-driven value observation usingAsyncStream. This feature enables observing changes in observable objects moreconveniently, particularly in asynchronous contexts.
Additionally,
AsyncStreamis extended to include anuntilmethod, allowing iteration to continue until a specified value is encountered, improving testing capabilities.With these changes, new unit tests are created in
ObservationTests.swiftto ensure that the observable streams function correctly.Also, update
Package.swiftto support macOS version 14, ensuring broader adoption and compatibility with recent macOS features.