package example
import scala.scalajs.js
import scala.scalajs.js.annotation._
object Example {
type Elem = js.Tuple2[String, js.Any]
type Elems = js.Array[Elem]
}
@JSExportTopLevel("Example")
@JSExportAll
class Example() {
import Example._
def foo(a: Elems) = a
}
generates the TS facade
export class Example {
constructor()
foo(a: Array): Array // <==== here is the error
}
export namespace example {
namespace Example {
type Elem = [string, any]
type Elems = (example.Example.Elem)[]
}
}
Thanks for this project. Very useful!
The scala-js code
generates the TS facade
while
is transpiled correctly to