Open KotlinIsland opened 3 years ago
declare function foo(name: "foo" | "bar"): void
Could be represented with:
external fun foo(name: NameOption) @Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE") external interface NameOption { companion object } inline val NameOption.Companion.foo get() = "foo".asDynamic().unsafeCast<NameOption>() inline val NameOption.Companion.bar get() = "bar".asDynamic().unsafeCast<NameOption>()
Could be represented with: