Skip to content

Commit d808d3c

Browse files
committed
Add a Sendable typealias to ReducerProtocol
1 parent 7873627 commit d808d3c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Sources/ComposableArchitecture/ReducerProtocol.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,3 +372,10 @@ extension ReducerProtocol where Body: ReducerProtocol, Body.State == State, Body
372372
/// ```
373373
public typealias ReducerProtocolOf<R: ReducerProtocol> = ReducerProtocol<R.State, R.Action>
374374
#endif
375+
376+
// NB: This allows autocompletion to prefer `Sendable` to `Send` when conforming reducer's state
377+
// and action to `Sendable`.
378+
extension ReducerProtocol {
379+
/// A type whose values can safely be passed across concurrency domains by copying.
380+
public typealias Sendable = Swift.Sendable
381+
}

0 commit comments

Comments
 (0)