I'm also noticing some weirdness with dukat and su...
# javascript
j
I'm also noticing some weirdness with dukat and such where it generates a type, totally what i want:
Copy code
open class Foo(config: `T$0`) {
  open fun bar(id: String): String
}
Then when I look at the js it's a little funky:
Copy code
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 suspect
Through much searching I figured out to do:
Copy code
@JsModule("@blah/blah/blah/Foo.js")
@JsNonModule
@JsName("Foo")
external object FooExport {
    fun Foo(config: `T$0`): Foo
}
which made things seem happy, but when I try to call
bar
I get
TypeError: Cannot read properties of undefined (reading 'bar')
Has anyone seen this, not sure what to do here 😞