@@ -61,27 +61,6 @@ extension Binding {
6161 #else
6262 @MainActor ( unsafe)
6363 #endif
64- public func scope< State: ObservableState , Action, ElementState, ElementAction> (
65- state: WritableKeyPath < State , StackState < ElementState > > ,
66- action: CaseKeyPath < Action , StackAction < ElementState , ElementAction > >
67- ) -> Binding < Store < StackState < ElementState > , StackAction < ElementState , ElementAction > > >
68- where Value == Store < State , Action > {
69- self [ state: state, action: action]
70- }
71-
72- @available (
73- * ,
74- deprecated,
75- message: """
76- Scoped 'state' must be a writable key path. For more information on this change, see the migration guide: https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/migratingto1.19#TODO
77- """
78- )
79- @_documentation ( visibility: private)
80- #if swift(>=5.10)
81- @preconcurrency @MainActor
82- #else
83- @MainActor ( unsafe)
84- #endif
8564 public func scope< State: ObservableState , Action, ElementState, ElementAction> (
8665 state: KeyPath < State , StackState < ElementState > > ,
8766 action: CaseKeyPath < Action , StackAction < ElementState , ElementAction > >
@@ -102,27 +81,6 @@ extension SwiftUI.Bindable {
10281 #else
10382 @MainActor ( unsafe)
10483 #endif
105- public func scope< State: ObservableState , Action, ElementState, ElementAction> (
106- state: WritableKeyPath < State , StackState < ElementState > > ,
107- action: CaseKeyPath < Action , StackAction < ElementState , ElementAction > >
108- ) -> Binding < Store < StackState < ElementState > , StackAction < ElementState , ElementAction > > >
109- where Value == Store < State , Action > {
110- self [ state: state, action: action]
111- }
112-
113- @available (
114- * ,
115- deprecated,
116- message: """
117- Scoped 'state' must be a writable key path. For more information on this change, see the migration guide: https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/migratingto1.19#TODO
118- """
119- )
120- @_documentation ( visibility: private)
121- #if swift(>=5.10)
122- @preconcurrency @MainActor
123- #else
124- @MainActor ( unsafe)
125- #endif
12684 public func scope< State: ObservableState , Action, ElementState, ElementAction> (
12785 state: KeyPath < State , StackState < ElementState > > ,
12886 action: CaseKeyPath < Action , StackAction < ElementState , ElementAction > >
@@ -141,22 +99,6 @@ extension Perception.Bindable {
14199 ///
142100 /// See ``SwiftUI/Binding/scope(state:action:fileID:filePath:line:column:)`` defined on `Binding` for more
143101 /// information.
144- public func scope< State: ObservableState , Action, ElementState, ElementAction> (
145- state: WritableKeyPath < State , StackState < ElementState > > ,
146- action: CaseKeyPath < Action , StackAction < ElementState , ElementAction > >
147- ) -> Binding < Store < StackState < ElementState > , StackAction < ElementState , ElementAction > > >
148- where Value == Store < State , Action > {
149- self [ state: state, action: action]
150- }
151-
152- @available (
153- * ,
154- deprecated,
155- message: """
156- Scoped 'state' must be a writable key path. For more information on this change, see the migration guide: https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/migratingto1.19#TODO
157- """
158- )
159- @_documentation ( visibility: private)
160102 public func scope< State: ObservableState , Action, ElementState, ElementAction> (
161103 state: KeyPath < State , StackState < ElementState > > ,
162104 action: CaseKeyPath < Action , StackAction < ElementState , ElementAction > >
@@ -176,27 +118,6 @@ extension UIBindable {
176118 #else
177119 @MainActor ( unsafe)
178120 #endif
179- public func scope< State: ObservableState , Action, ElementState, ElementAction> (
180- state: WritableKeyPath < State , StackState < ElementState > > ,
181- action: CaseKeyPath < Action , StackAction < ElementState , ElementAction > >
182- ) -> UIBinding < Store < StackState < ElementState > , StackAction < ElementState , ElementAction > > >
183- where Value == Store < State , Action > {
184- self [ state: state, action: action]
185- }
186-
187- @available (
188- * ,
189- deprecated,
190- message: """
191- Scoped 'state' must be a writable key path. For more information on this change, see the migration guide: https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/migratingto1.19#TODO
192- """
193- )
194- @_documentation ( visibility: private)
195- #if swift(>=5.10)
196- @preconcurrency @MainActor
197- #else
198- @MainActor ( unsafe)
199- #endif
200121 public func scope< State: ObservableState , Action, ElementState, ElementAction> (
201122 state: KeyPath < State , StackState < ElementState > > ,
202123 action: CaseKeyPath < Action , StackAction < ElementState , ElementAction > >
@@ -463,24 +384,6 @@ public struct _NavigationLinkStoreContent<State, Label: View>: View {
463384}
464385
465386extension Store where State: ObservableState {
466- fileprivate subscript< ElementState, ElementAction> (
467- state state: WritableKeyPath < State , StackState < ElementState > > ,
468- action action: CaseKeyPath < Action , StackAction < ElementState , ElementAction > > ,
469- isInViewBody isInViewBody: Bool = _isInPerceptionTracking
470- ) -> Store < StackState < ElementState > , StackAction < ElementState , ElementAction > > {
471- get {
472- #if DEBUG && !os(visionOS)
473- _PerceptionLocals. $isInPerceptionTracking. withValue ( isInViewBody) {
474- self . scope ( state: state, action: action)
475- }
476- #else
477- self . scope ( state: state, action: action)
478- #endif
479- }
480- set { }
481- }
482-
483- @available ( * , deprecated)
484387 fileprivate subscript< ElementState, ElementAction> (
485388 state state: KeyPath < State , StackState < ElementState > > ,
486389 action action: CaseKeyPath < Action , StackAction < ElementState , ElementAction > > ,
0 commit comments