Edoardo Luppi
10/13/2023, 1:17 PMexpect class
that maps to a typealias
.
// commonMain
public expect class MyByteArray(size: Int)
// jsMain
public actual typealias MyByteArray = Uint8Array
The Uint8Array
class comes from kotlin-wrappers.
Now, every time I use MyByteArray
in a JsExport
-ed definition in commonMain
, I also have to annotate it with
@Suppress("NON_EXPORTABLE_TYPE")
Otherwise the IDE complains about it, as per screenshot.
I suppose it's an IDE-only issue as I don't see any warning at compile time.
Anyone else noticed this?hfhbd
10/13/2023, 1:20 PMEdoardo Luppi
10/13/2023, 1:22 PM@Suppress("NON_EXPORTABLE_TYPE")
is you risk having TS types generated as any
without knowing it.