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 @@ -193,3 +193,24 @@ public fun <T> Flow<Flow<T>>.merge(): Flow<T> = error("Should not be called")
193
193
replaceWith = ReplaceWith (" flattenConcat()" )
194
194
)
195
195
public fun <T > Flow<Flow<T>>.flatten (): Flow <T > = error(" Should not be called" )
196
+
197
+ /* *
198
+ * Kotlin has a built-in generic mechanism for making chained calls.
199
+ * If you wish to write something like
200
+ * ```
201
+ * myFlow.compose(MyFlowExtensions.ignoreErrors()).collect { ... }
202
+ * ```
203
+ * you can replace it with
204
+ *
205
+ * ```
206
+ * myFlow.let(MyFlowExtensions.ignoreErrors()).collect { ... }
207
+ * ```
208
+ *
209
+ * @suppress
210
+ */
211
+ @Deprecated(
212
+ level = DeprecationLevel .ERROR ,
213
+ message = " Kotlin analogue of compose is 'let'" ,
214
+ replaceWith = ReplaceWith (" let(transformer)" )
215
+ )
216
+ 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