Kotlin / dukat

Converter of <any kind of declarations> to Kotlin external declarations
554 stars 42 forks source link

fix(#415): compile readonly fields into val. #458

Closed JSMonk closed 3 years ago

JSMonk commented 3 years ago

Summary

Currently we ignore readonly qualifier for class and interface fields.

declare class Foo {
  readonly BAR: string
}

Today, we compile the class in the next one:

external open class Foo {
  var BAR: String
}

Those changes provide compilation readonly fields into val variables:

external open class Foo {
    val BAR: String
}

Related Issue

https://github.com/Kotlin/dukat/issues/415