Artem Kobzar
05/08/2025, 7:00 PMCLOVIS
05/09/2025, 7:06 AMArtem Kobzar
05/09/2025, 7:16 AMCLOVIS
05/09/2025, 7:27 AMEdoardo Luppi
05/09/2025, 7:33 AMArjan van Wieringen
05/09/2025, 2:38 PMEdoardo Luppi
05/13/2025, 9:01 AMArtem Kobzar
05/13/2025, 10:43 AM// commonMain
expect class Foo
expect fun createAny(): Any?
fun main() {
val test = createAny()
println(test as Foo) // No warnings/errors in this case
}
// jsMain
actual typealias Foo = Promise<Unit>
actual fun createAny() = Promise<Int> { it.toFloat() }
2. Inheritance
// commonMain
expect open class Foo
class FooChild : Foo() // No warnings/errors in this case
// jsMain
actual typealias Foo = Promise<*>
Edoardo Luppi
05/13/2025, 11:10 AMFoo
anymore, but with Promise<Unit>
. Maybe this is what @bobko meant with platform checkers in common?Artem Kobzar
05/13/2025, 11:16 AM