Skip to content

Update documentation links to the Observable macro and protocol (112678394) #67535

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/// Conforming to this protocol signals to other APIs that the type supports
/// observation. However, applying the `Observable` protocol by itself to a
/// type doesn't add observation functionality to the type. Instead, always use
/// the ``Observation/Observable-swift.macro`` macro when adding observation
/// the ``Observation/Observable()`` macro when adding observation
/// support to a type.
@available(SwiftStdlib 5.9, *)
public protocol Observable { }
Expand All @@ -25,9 +25,8 @@ public protocol Observable { }
/// Defines and implements conformance of the Observable protocol.
///
/// This macro adds observation support to a custom type and conforms the type
/// to the ``Observation/Observable-swift.protocol`` protocol. For example, the
/// following code applies the `Observable` macro to the type `Car` making it
/// observable:
/// to the ``Observation/Observable`` protocol. For example, the following code
/// applies the `Observable` macro to the type `Car` making it observable:
///
/// @Observable
/// class Car {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
/// Provides storage for tracking and access to data changes.
///
/// You don't need to create an instance of `ObservationRegistrar` when using
/// the ``Observation/Observable-swift.macro`` macro to indicate observability
/// of a type.
/// the ``Observation/Observable()`` macro to indicate observability of a type.
@available(SwiftStdlib 5.9, *)
public struct ObservationRegistrar: Sendable {
internal class ValueObservationStorage {
Expand Down Expand Up @@ -301,7 +300,7 @@ public struct ObservationRegistrar: Sendable {
///
/// You don't need to create an instance of
/// ``Observation/ObservationRegistrar`` when using the
/// ``Observation/Observable-swift.macro`` macro to indicate observably
/// ``Observation/Observable()`` macro to indicate observably
/// of a type.
public init() {
}
Expand Down