rickclephas / KMP-NativeCoroutines

Library to use Kotlin Coroutines from Swift code in KMP apps
MIT License
1.07k stars 32 forks source link

NativeCoroutinesRefined and NativeCoroutinesRefinedState annotations #120

Closed rickclephas closed 1 year ago

rickclephas commented 1 year ago

You could for example refine your Flow property to an AnyPublisher property:

class Clock {
    @NativeCoroutinesRefined
    val time: StateFlow<Long>
}
extension Clock {
    var time: AnyPublisher<KotlinLong, Error> {
        createPublisher(for: __time)
    }
}

Fixes #119