@@ -69,9 +69,9 @@ public struct SwitchStore<State, Action, Content>: View where Content: View {
69
69
public struct CaseLet < GlobalState, GlobalAction, LocalState, LocalAction, Content> : View
70
70
where Content: View {
71
71
@EnvironmentObject private var store : StoreObservableObject < GlobalState , GlobalAction >
72
- let toLocalState : ( GlobalState ) -> LocalState ?
73
- let fromLocalAction : ( LocalAction ) -> GlobalAction
74
- let content : ( Store < LocalState , LocalAction > ) -> Content
72
+ public let toLocalState : ( GlobalState ) -> LocalState ?
73
+ public let fromLocalAction : ( LocalAction ) -> GlobalAction
74
+ public let content : ( Store < LocalState , LocalAction > ) -> Content
75
75
76
76
/// Initializes a `CaseLet` view that computes content depending on if a store of enum state
77
77
/// matches a particular case.
@@ -158,10 +158,9 @@ extension SwitchStore {
158
158
159
159
public init < State1, Action1, Content1> (
160
160
_ store: Store < State , Action > ,
161
- @ViewBuilder content: @escaping ( )
162
- -> CaseLet < State , Action , State1 , Action1 , Content1 > ,
163
161
file: StaticString = #file,
164
- line: UInt = #line
162
+ line: UInt = #line,
163
+ @ViewBuilder content: @escaping ( ) -> CaseLet < State , Action , State1 , Action1 , Content1 >
165
164
)
166
165
where
167
166
Content == WithViewStore <
@@ -216,12 +215,14 @@ extension SwitchStore {
216
215
217
216
public init < State1, Action1, Content1, State2, Action2, Content2> (
218
217
_ store: Store < State , Action > ,
219
- @ViewBuilder content: @escaping ( ) -> TupleView < (
220
- CaseLet < State , Action , State1 , Action1 , Content1 > ,
221
- CaseLet < State , Action , State2 , Action2 , Content2 >
222
- ) > ,
223
218
file: StaticString = #file,
224
- line: UInt = #line
219
+ line: UInt = #line,
220
+ @ViewBuilder content: @escaping ( ) -> TupleView <
221
+ (
222
+ CaseLet < State , Action , State1 , Action1 , Content1 > ,
223
+ CaseLet < State , Action , State2 , Action2 , Content2 >
224
+ )
225
+ >
225
226
)
226
227
where
227
228
Content == WithViewStore <
@@ -291,13 +292,15 @@ extension SwitchStore {
291
292
292
293
public init < State1, Action1, Content1, State2, Action2, Content2, State3, Action3, Content3> (
293
294
_ store: Store < State , Action > ,
294
- @ViewBuilder content: @escaping ( ) -> TupleView < (
295
- CaseLet < State , Action , State1 , Action1 , Content1 > ,
296
- CaseLet < State , Action , State2 , Action2 , Content2 > ,
297
- CaseLet < State , Action , State3 , Action3 , Content3 >
298
- ) > ,
299
295
file: StaticString = #file,
300
- line: UInt = #line
296
+ line: UInt = #line,
297
+ @ViewBuilder content: @escaping ( ) -> TupleView <
298
+ (
299
+ CaseLet < State , Action , State1 , Action1 , Content1 > ,
300
+ CaseLet < State , Action , State2 , Action2 , Content2 > ,
301
+ CaseLet < State , Action , State3 , Action3 , Content3 >
302
+ )
303
+ >
301
304
)
302
305
where
303
306
Content == WithViewStore <
@@ -384,14 +387,16 @@ extension SwitchStore {
384
387
State4, Action4, Content4
385
388
> (
386
389
_ store: Store < State , Action > ,
387
- @ViewBuilder content: @escaping ( ) -> TupleView < (
388
- CaseLet < State , Action , State1 , Action1 , Content1 > ,
389
- CaseLet < State , Action , State2 , Action2 , Content2 > ,
390
- CaseLet < State , Action , State3 , Action3 , Content3 > ,
391
- CaseLet < State , Action , State4 , Action4 , Content4 >
392
- ) > ,
393
390
file: StaticString = #file,
394
- line: UInt = #line
391
+ line: UInt = #line,
392
+ @ViewBuilder content: @escaping ( ) -> TupleView <
393
+ (
394
+ CaseLet < State , Action , State1 , Action1 , Content1 > ,
395
+ CaseLet < State , Action , State2 , Action2 , Content2 > ,
396
+ CaseLet < State , Action , State3 , Action3 , Content3 > ,
397
+ CaseLet < State , Action , State4 , Action4 , Content4 >
398
+ )
399
+ >
395
400
)
396
401
where
397
402
Content == WithViewStore <
@@ -490,15 +495,17 @@ extension SwitchStore {
490
495
State5, Action5, Content5
491
496
> (
492
497
_ store: Store < State , Action > ,
493
- @ViewBuilder content: @escaping ( ) -> TupleView < (
494
- CaseLet < State , Action , State1 , Action1 , Content1 > ,
495
- CaseLet < State , Action , State2 , Action2 , Content2 > ,
496
- CaseLet < State , Action , State3 , Action3 , Content3 > ,
497
- CaseLet < State , Action , State4 , Action4 , Content4 > ,
498
- CaseLet < State , Action , State5 , Action5 , Content5 >
499
- ) > ,
500
498
file: StaticString = #file,
501
- line: UInt = #line
499
+ line: UInt = #line,
500
+ @ViewBuilder content: @escaping ( ) -> TupleView <
501
+ (
502
+ CaseLet < State , Action , State1 , Action1 , Content1 > ,
503
+ CaseLet < State , Action , State2 , Action2 , Content2 > ,
504
+ CaseLet < State , Action , State3 , Action3 , Content3 > ,
505
+ CaseLet < State , Action , State4 , Action4 , Content4 > ,
506
+ CaseLet < State , Action , State5 , Action5 , Content5 >
507
+ )
508
+ >
502
509
)
503
510
where
504
511
Content == WithViewStore <
0 commit comments