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 @@ -209,3 +209,24 @@ public fun <T> Flow<Flow<T>>.merge(): Flow<T> = error("Should not be called")
209
209
replaceWith = ReplaceWith (" flattenConcat()" )
210
210
)
211
211
public fun <T > Flow<Flow<T>>.flatten (): Flow <T > = error(" Should not be called" )
212
+
213
+ /* *
214
+ * Kotlin has a built-in generic mechanism for making chained calls.
215
+ * If you wish to write something like
216
+ * ```
217
+ * myFlow.compose(MyFlowExtensions.ignoreErrors()).collect { ... }
218
+ * ```
219
+ * you can replace it with
220
+ *
221
+ * ```
222
+ * myFlow.let(MyFlowExtensions.ignoreErrors()).collect { ... }
223
+ * ```
224
+ *
225
+ * @suppress
226
+ */
227
+ @Deprecated(
228
+ level = DeprecationLevel .ERROR ,
229
+ message = " Kotlin analogue of compose is 'let'" ,
230
+ replaceWith = ReplaceWith (" let(transformer)" )
231
+ )
232
+ 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