Another mapping question. Given ```entries(): Iter...
# javascript
e
Another mapping question. Given
Copy code
entries(): IterableIterator<[number, number]>
Could that be a
Copy code
open fun entries(): IterableIterator<Pair<Number, Number>>
? Or should it be an array?
a
No, you can map it only on Kotlin Array. In Kotlin there is no entity like
IterableIterator
. In JS,
IterableIterator
it's an object which provide both
[Symbol.iterator]
and
next
methods.
Also, you can try to use
JsIterable
type that placed in
kotlin-wrappers
e
@Artem Kobzar thanks! I think
IterableIterator
is a recent addition in Kotlin Wrappers then
👍 1
t
TS
Copy code
entries(): IterableIterator<[number, number]>
Kotlin
Copy code
entries(): IterableIterator<JsTuple2<Number, Number>>
gratitude thank you 1
I think
IterableIterator
is a recent addition in Kotlin Wrappers then
It’s old 🙂
e
Copy code
JsTuple
Every day I learn something new lol
t
And
tupleOf
- factory method
e
What would be a use case for
emptyTuple
?
t
Payload of
EventEmmiter.on
async iterator
✔️ 1
Every day I learn something new lol
All JS and TS types, which you need for strict declarations are already here
gratitude thank you 1