konsoletyper
03/09/2017, 9:24 AM@JsValueType
external sealed class Base() {
class A(val x: Int) : Base()
class B(val x: String) : Base()
}
with number of restrictions to external sealed classes marked with @JsValueType annotation. Say, without full RTTI (as we do with external interfaces) and with exactly one val parameter in primary constructors.