Mendess
04/20/2022, 9:51 AMclass Foo<T>(val array: Array<T>)
but when I annotate with @JsExport
I get the warning saying Array is not exportable, but the docs seem to suggest otherwise.
error: Exported declaration uses non-exportable property type: Array<T>
docs: https://kotlinlang.org/docs/js-to-kotlin-interop.html#kotlin-types-in-javascriptGrégory Lureau
04/20/2022, 9:55 AMT
that is not exportable in your case.Mendess
04/20/2022, 9:57 AMGrégory Lureau
04/20/2022, 10:07 AMMendess
04/20/2022, 10:10 AMGrégory Lureau
04/20/2022, 12:56 PMis
does not work for some reasons...Grégory Lureau
04/20/2022, 12:57 PMis
(or related methods) can be tricky / different from the other stacks (like Android / iOS)Mendess
04/20/2022, 12:58 PMfun getAll(): MyCollection<Person>
so I should be okay, as long as typescript can "follow" the generic to typecheck itMendess
04/20/2022, 12:58 PMGrégory Lureau
04/20/2022, 12:59 PMget(index: Int): T
kind of methods on your collection? It may be good enough for you then.Mendess
04/20/2022, 1:01 PMclass Collection<T>(val items: Array<T>)
and I want js code to do things like getAll().items[0]
for example