Kotlin / dukat

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

fix(Interface Readonly): convert interface's and object type's readonly properties into val. #468

Closed JSMonk closed 3 years ago

JSMonk commented 3 years ago

Summary

There is a bug in the interface and object types conversion: readonly members will be translated into var instead of val. Example:

declare interface A {
  readonly a: number;
}

Actual:

external interface A {
  var a: Number
}

Expected:

external interface A {
  val a: Number
}