Kotlin / dukat

Converter of <any kind of declarations> to Kotlin external declarations
552 stars 44 forks source link

Support global variables declared in module #409

Open Schahen opened 3 years ago

Schahen commented 3 years ago

Consider following code:

declare module "api" {
  global {
     function ping();
  }
}

It translates to following:

// [test] aaa.api.global.module_resolved_name.kt
@file:JsQualifier("api.global")
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
package api.global

external fun ping()

The qualifier here is a bug, since this are global declarations.