File tree 1 file changed +21
-0
lines changed
kotlinx-coroutines-core/common/src/flow
1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -194,3 +194,24 @@ public fun <T> Flow<Flow<T>>.merge(): Flow<T> = error("Should not be called")
194
194
replaceWith = ReplaceWith (" flattenConcat()" )
195
195
)
196
196
public fun <T > Flow<Flow<T>>.flatten (): Flow <T > = error(" Should not be called" )
197
+
198
+ /* *
199
+ * Kotlin has a built-in generic mechanism for making chained calls.
200
+ * If you wish to write something like
201
+ * ```
202
+ * myFlow.compose(MyFlowExtensions.ignoreErrors()).collect { ... }
203
+ * ```
204
+ * you can replace it with
205
+ *
206
+ * ```
207
+ * myFlow.let(MyFlowExtensions.ignoreErrors()).collect { ... }
208
+ * ```
209
+ *
210
+ * @suppress
211
+ */
212
+ @Deprecated(
213
+ level = DeprecationLevel .ERROR ,
214
+ message = " Kotlin analogue of compose is 'let'" ,
215
+ replaceWith = ReplaceWith (" let(transformer)" )
216
+ )
217
+ public fun <T , R > Flow<T>.compose (transformer : Flow <T >.() -> Flow <R >): Flow <R > = error(" Should not be called" )
You can’t perform that action at this time.
0 commit comments