Kotlin / dukat

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

Support global variables declared in module #409

Open Schahen opened 4 years ago

Schahen commented 4 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.