Conversion from AsyncSequence to Flow is not yet supported
Is there any way around it?
r
russhwolf
10/10/2023, 5:08 PM
There's nothing built-in, but you could probably wire something up manually.
eg
Copy code
// Kotlin
val kotlinFlow = MutableStateFlow<T>()
fun emitFromFlow(item: T) {
kotlinFlow.emit(item)
}
// Swift
let sequence: AsyncSequence
for await item in sequence {
emitFromFlow(item)
}