How do I translate this TS enum in Kotlin external...
# javascript
e
How do I translate this TS enum in Kotlin externals?
Copy code
export enum ViewColumn {
    Active = -1,
    Beside = -2
}
a
Copy code
external object ViewColumn {
  val Active: Int
  val Beside: Int
}
gratitude thank you 2
e
Or, with the Seskar plugin it can become
Copy code
@JsVirtual
sealed external interface ViewColumn {
    companion object {
        @JsIntValue(-1)
        val Active: ViewColumn

        @JsIntValue(-2)
        val Beside: ViewColumn
    }
}
🤪 1