Kotlin / dukat

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

Modules with unquoted names are treated like JsModules #410

Open Schahen opened 3 years ago

Schahen commented 3 years ago

Following test case we have:

declare module a {
  function ping(a: b.AlphaNumeric);
}

declare module b {
  type AlphaNumeric = string | number
}

export = a.ping

is translated to:

package a

@JsModule("resolved_name")
external fun ping(a: String)

@JsModule("resolved_name")
external fun ping(a: Number)

Which is wrong since module with name without quotes it's just a namespace under disguise.