// copy of ArrayBuffer because of a conflict with the class SparkMD5.ArrayBuffer
interface ArrayBufferCopy extends ArrayBuffer {}
declare namespace SparkMD5 {
class ArrayBuffer {
append(str: ArrayBufferCopy): ArrayBuffer;
}
}
generated code:
import SparkMD5.ArrayBuffer
external interface ArrayBufferCopy : ArrayBuffer
@JsModule("definitely-typed")
external open class SparkMD5 {
open class ArrayBuffer {
open fun append(str: ArrayBufferCopy): ArrayBuffer
}
}
And because of this import, ArrayBufferCopy is inherited from SparkMD5.ArrayBuffer, not from stdlib org.khronos.webgl.ArrayBuffer, as it should be.
Another related, but a bit different problem is reproduced on oracle__oraclejet/ojrouter. Because of some merging, we end up with structure like this:
external open class Router {
open var currentState: () -> RouterState?
interface RouterState
}
external open class RouterState
If we examine FQN of currentState, we will find that this type should be reference to top-level <ROOT>.RouterState, but with no imports or other manipulations compiler will treat it as Router.RouterState by default.
spark-md5
:generated code:
And because of this import,
ArrayBufferCopy
is inherited fromSparkMD5.ArrayBuffer
, not from stdliborg.khronos.webgl.ArrayBuffer
, as it should be.Another related, but a bit different problem is reproduced on
oracle__oraclejet/ojrouter
. Because of some merging, we end up with structure like this:If we examine FQN of
currentState
, we will find that this type should be reference to top-level<ROOT>.RouterState
, but with no imports or other manipulations compiler will treat it asRouter.RouterState
by default.