martmists
06/24/2025, 5:20 PMnamespace JSZip
with new(): this;
and (): JSZip
but I can't figure out how to call it. I tried external fun JSZip
as well as external class JSZip
and both give errors.Vidmantas Kerbelis
06/24/2025, 6:17 PM@file:JsModule("jszip")
external class JSZip {
constructor()
fun file(name: String, data: String, options: FileOptions = definedExternally): JSZip
// ... Other functions, didn't bother to write them all out
}
external interface FileOptions { /* ... */ }
Try this?
OR try this:
external class JSZip {
companion object {
operator fun invoke(): JSZip
}
}
martmists
06/24/2025, 6:52 PMUncaught TypeError: _ref_anN6aXA_.JSZip is not a constructor
2. See imageVidmantas Kerbelis
06/25/2025, 4:14 AM@JsName("default")
to the external class JSZip
maybe it's exported via default export.turansky
06/25/2025, 12:44 PMJsZip
declarations in Kotlin Wrappersturansky
06/25/2025, 12:45 PMturansky
06/25/2025, 1:04 PMJSZip
should work on WASM too.turansky
06/25/2025, 7:26 PM2025.6.11
🎉🎉🎉