Looking to port some Kotlin/JS code over to WasmJs...
# webassembly
j
Looking to port some Kotlin/JS code over to WasmJs and running in to following (already changed parameter type from
dynamic
to
JsAny
btw as mentioned in https://kotlinlang.org/docs/wasm-js-interop.html#kotlin-wasm-and-kotlin-js-interoperability-differences . I'll keep digging but in case anything obvious
ah, just saw
Copy code
Applies stricter type restrictions uniformly to all interop declarations external, = js("code"), and @JsExport. Allows a select number of built-in Kotlin types and JsAny subtypes.
The Kotlin/JS code also uses
JsNonModule
but see following for Wasm
Copy code
Supports ES modules only. There is no analog of the @JsNonModule annotation. Provides its exports as properties on the default object. Allows exporting package-level functions only.
r
You need to use
JsNumber
type instead of
Number
👍 1
s
Or just
Double
or
Int
if these will do