You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This section outlines some of the custom operators CombineExt provides.
76
76
77
-
###withLatestFrom
77
+
## withLatestFrom
78
78
79
-
Merges two publishers into a single publisher by combining each value from `self` with the _latest_ value from the second publisher, if any.
79
+
### withLatestFrom(_:)
80
+
81
+
Merges **two** publishers into a single publisher by combining each value from `self` with the _latest_ value from the second publisher, if any.
80
82
81
83
```swift
82
84
let taps = PassthroughSubject<Void, Never>()
@@ -100,6 +102,78 @@ withLatestFrom: Hello
100
102
withLatestFrom: World!
101
103
```
102
104
105
+
------
106
+
107
+
### withLatestFrom(_: _:)
108
+
109
+
Merges **three** publishers into a single publisher by combining each value from `self` with the *latest* value from the second and third publisher, if any.
110
+
111
+
```swift
112
+
let taps = PassthroughSubject<Void, Never>()
113
+
let strings = CurrentValueSubject<String, Never>("Hello")
Merges **four** publishers into a single publisher by combining each value from `self` with the *latest* value from the second, third and fourth publisher, if any.
143
+
144
+
```swift
145
+
let taps = PassthroughSubject<Void, Never>()
146
+
let strings = CurrentValueSubject<String, Never>("Hello")
0 commit comments