has there been a change in how kotlin handles arra...
# javascript
t
has there been a change in how kotlin handles arrays? because i'm using
someList.toTypedArray()
somewhere and in the debugger i can see it uses an
Array
-implementation instead of a js-native array...
a
No, it's just bad naming.
toTypedArray
returns
Array<T>
, which is admittedly confusing: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/to-typed-array.html
t
you mean a
Array<Int>
will be translated to a native js array while an
Array<T>
wont?
a
I mean that an
Array<Int>
is translated to JS
Array
, whereas
IntArray
is translated to
Int32Array
t
oh isee, thank you 🙂
a
👍