@@ -3,7 +3,7 @@ import ReactiveSwift
3
3
import XCTestDynamicOverlay
4
4
5
5
#if canImport(SwiftUI)
6
- import SwiftUI
6
+ import SwiftUI
7
7
#endif
8
8
9
9
/// This type is deprecated in favor of ``EffectTask``. See its documentation for more information.
@@ -105,17 +105,17 @@ extension EffectProducer {
105
105
/// the Combine interface to ``EffectProducer`` is considered soft deprecated, and you should
106
106
/// eventually port to Swift's native concurrency tools.
107
107
///
108
- /// > Important: The publisher interface to ``EffectTask`` is considered deperecated , and you should
109
- /// try converting any uses of that interface to Swift's native concurrency tools.
108
+ /// > Important: The publisher interface to ``EffectTask`` is considered deprecated , and you should
109
+ /// > try converting any uses of that interface to Swift's native concurrency tools.
110
110
/// >
111
111
/// > Also, ``Store`` is not thread safe, and so all effects must receive values on the same
112
- /// thread. This is typically the main thread, **and** if the store is being used to drive UI then
113
- /// it must receive values on the main thread.
112
+ /// > thread. This is typically the main thread, **and** if the store is being used to drive UI
113
+ /// > then it must receive values on the main thread.
114
114
/// >
115
115
/// > This is only an issue if using the Combine interface of ``EffectProducer`` as mentioned
116
- /// above. If you are using Swift's concurrency tools and the `.task`, `.run` and `.fireAndForget`
117
- /// functions on ``EffectTask``, then threading is automatically handled for you.
118
- public typealias EffectTask < Action> = Effect < Action , Never >
116
+ /// > above. If you are using Swift's concurrency tools and the `.task`, `.run`, and
117
+ /// > `.fireAndForget` functions on ``EffectTask``, then threading is automatically handled for you.
118
+ public typealias EffectTask < Action> = EffectPublisher < Action , Never >
119
119
120
120
extension EffectProducer where Failure == Never {
121
121
/// Wraps an asynchronous unit of work in an effect.
@@ -373,17 +373,17 @@ public struct Send<Action> {
373
373
}
374
374
375
375
#if canImport(SwiftUI)
376
- /// Sends an action back into the system from an effect with animation.
377
- ///
378
- /// - Parameters:
379
- /// - action: An action.
380
- /// - animation: An animation.
381
- public func callAsFunction( _ action: Action , animation: Animation ? ) {
382
- guard !Task. isCancelled else { return }
383
- withAnimation ( animation) {
384
- self ( action)
385
- }
376
+ /// Sends an action back into the system from an effect with animation.
377
+ ///
378
+ /// - Parameters:
379
+ /// - action: An action.
380
+ /// - animation: An animation.
381
+ public func callAsFunction( _ action: Action , animation: Animation ? ) {
382
+ guard !Task. isCancelled else { return }
383
+ withAnimation ( animation) {
384
+ self ( action)
386
385
}
386
+ }
387
387
#endif
388
388
}
389
389
0 commit comments