Hi, I'm trying to consume Dexie.js from within a K...
# javascript
m
Hi, I'm trying to consume Dexie.js from within a Kotlin JS library that's setup to use Common JS. I'm using some ts2kt generated bindings along the lines of:
Copy code
@JsModule("dexie")
external open class Dexie(databaseName: String, options: `T$0`? = definedExternally /* null */) {
    open var name: String = definedExternally
    open fun open(): Dexie.Promise<Dexie> = definedExternally
    open fun table(tableName: String): Dexie.Table<Any, Any> = definedExternally
  
    companion object {
        // ...
        var default: Dexie = definedExternally
        // ...
    }
    // ...
}
I manually added the
JsModule
line, but in the browser, I get:
Copy code
TypeError: $module$dexie is not a constructor
var database = new $module$dexie('AudioBlobStore');
And when I inspect
$module$dexie
in the debugger, it looks like the attached image. Any suggestions on how I can adjust my bindings?