@@ -206,27 +206,27 @@ extension Signal.Event: EventProtocol {
206206// This operator performs side effect upon interruption.
207207
208208extension Signal . Event {
209- internal typealias Transformation < U, E: Swift . Error > = ( ReactiveSwift . Observer < U , E > , Lifetime ) -> ReactiveSwift . Observer < Value , Error >
209+ internal typealias Transformation < U, E: Swift . Error > = ( any ReactiveSwift . Observer < U , E > , Lifetime ) -> ( any ReactiveSwift . Observer < Value , Error > )
210210
211- internal static func filter( _ isIncluded: @escaping ( Value ) -> Bool ) -> Transformation < Value , Error > {
211+ internal static func filter( _ isIncluded: @escaping @ Sendable ( Value ) -> Bool ) -> Transformation < Value , Error > {
212212 return { downstream, _ in
213213 Operators . Filter ( downstream: downstream, predicate: isIncluded)
214214 }
215215 }
216216
217- internal static func compactMap< U> ( _ transform: @escaping ( Value ) -> U ? ) -> Transformation < U , Error > {
217+ internal static func compactMap< U> ( _ transform: @escaping @ Sendable ( Value ) -> U ? ) -> Transformation < U , Error > {
218218 return { downstream, _ in
219219 Operators . CompactMap ( downstream: downstream, transform: transform)
220220 }
221221 }
222222
223- internal static func map< U> ( _ transform: @escaping ( Value ) -> U ) -> Transformation < U , Error > {
223+ internal static func map< U> ( _ transform: @escaping @ Sendable ( Value ) -> U ) -> Transformation < U , Error > {
224224 return { downstream, _ in
225225 Operators . Map ( downstream: downstream, transform: transform)
226226 }
227227 }
228228
229- internal static func mapError< E> ( _ transform: @escaping ( Error ) -> E ) -> Transformation < Value , E > {
229+ internal static func mapError< E> ( _ transform: @escaping @ Sendable ( Error ) -> E ) -> Transformation < Value , E > {
230230 return { downstream, _ in
231231 Operators . MapError ( downstream: downstream, transform: transform)
232232 }
@@ -244,13 +244,13 @@ extension Signal.Event {
244244 }
245245 }
246246
247- internal static func attemptMap< U> ( _ transform: @escaping ( Value ) -> Result < U , Error > ) -> Transformation < U , Error > {
247+ internal static func attemptMap< U> ( _ transform: @escaping @ Sendable ( Value ) -> Result < U , Error > ) -> Transformation < U , Error > {
248248 return { downstream, _ in
249249 Operators . AttemptMap ( downstream: downstream, transform: transform)
250250 }
251251 }
252252
253- internal static func attempt( _ action: @escaping ( Value ) -> Result < ( ) , Error > ) -> Transformation < Value , Error > {
253+ internal static func attempt( _ action: @escaping @ Sendable ( Value ) -> Result < ( ) , Error > ) -> Transformation < Value , Error > {
254254 return attemptMap { value -> Result < Value , Error > in
255255 return action ( value) . map { _ in value }
256256 }
@@ -285,13 +285,13 @@ extension Signal.Event {
285285 }
286286 }
287287
288- internal static func take( while shouldContinue: @escaping ( Value ) -> Bool ) -> Transformation < Value , Error > {
288+ internal static func take( while shouldContinue: @escaping @ Sendable ( Value ) -> Bool ) -> Transformation < Value , Error > {
289289 return { downstream, _ in
290290 Operators . TakeWhile ( downstream: downstream, shouldContinue: shouldContinue)
291291 }
292292 }
293293
294- internal static func take( until shouldContinue: @escaping ( Value ) -> Bool ) -> Transformation < Value , Error > {
294+ internal static func take( until shouldContinue: @escaping @ Sendable ( Value ) -> Bool ) -> Transformation < Value , Error > {
295295 return { downstream, _ in
296296 Operators . TakeUntil ( downstream: downstream, shouldContinue: shouldContinue)
297297 }
@@ -397,7 +397,7 @@ extension Signal.Event {
397397 return scan ( into: initialResult) { $0 = nextPartialResult ( $0, $1) }
398398 }
399399
400- internal static func scanMap< State, U> ( into initialState: State , _ next: @escaping ( inout State , Value ) -> U ) -> Transformation < U , Error > {
400+ internal static func scanMap< State, U> ( into initialState: State , _ next: @escaping @ Sendable ( inout State , Value ) -> U ) -> Transformation < U , Error > {
401401 return { downstream, _ in
402402 Operators . ScanMap ( downstream: downstream, initial: initialState, next: next)
403403 }
0 commit comments