Jim
03/02/2022, 11:01 PMopen class Foo(config: `T$0`) {
open fun bar(id: String): String
}
Then when I look at the js it's a little funky:
var Foo = (function(() {
function Foo(config) {
...
}
Foo.prototype.bar = function(id) {
return "..."
}
}
..continued in thread
Edit: I figured it out - the @JsModule
needs to be for the whole file since it didn't know where T$0
was coming from, I suspectJim
03/02/2022, 11:02 PM@JsModule("@blah/blah/blah/Foo.js")
@JsNonModule
@JsName("Foo")
external object FooExport {
fun Foo(config: `T$0`): Foo
}
Jim
03/02/2022, 11:02 PMbar
I get TypeError: Cannot read properties of undefined (reading 'bar')
Jim
03/02/2022, 11:08 PM