May be we should design something like ``` @JsVal...
# javascript
k
May be we should design something like
Copy code
@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.