Tristan
08/15/2021, 9:15 PMd.ts
file:
kotlinx.coroutines.flow.SharedFlow<kotlin.collections.List<string>>
I currently use
sourceSets {
all {
languageSettings.useExperimentalAnnotation("kotlinx.serialization.ExperimentalSerializationApi")
}
val commonMain by getting {
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-serialization-protobuf:1.2.2")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1")
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
}
}
val jsMain by getting
val jsTest by getting
}
How can I include the definitions from kotlin stdlib and coroutines?Tristan
08/16/2021, 12:14 PMhfhbd
08/16/2021, 12:36 PMBig Chungus
08/16/2021, 12:57 PMTristan
08/16/2021, 12:57 PMBig Chungus
08/16/2021, 1:01 PM@JsExport
value class MySharedFlow(private val flow: SharedFlow) {
// expose flow methods here and delegate to backing field
}
Tristan
08/16/2021, 1:01 PM"our-module": "<file://path/to/kotlin/project>"
The issue with the typing is that is exposes some types that are not defined in the d.ts
such as kotlinx.coroutines.flow.SharedFlow<kotlin.collections.List<string>>
Big Chungus
08/16/2021, 1:01 PMTristan
08/16/2021, 1:06 PMapi
instead of implementation
but it does not work, or even use the JS version of coroutines
but it does not include any typing.
Thanks, I'll work with what you gave meBig Chungus
08/16/2021, 1:07 PM