Pavel Matusevich
11/29/2021, 9:22 PMthis
when executing callback
) from JS Set? My current implementation is
@JsName("Set")
external class JsSet<T> {
...
fun <A> forEach(callback: (value: T, key: T, set: JsSet<T>, thisArg: A) -> Unit, thisArg: A)
...
}
However, when calling this function
forEach({ key, value, set, thisArg ->
console.log("1", key, "2", value, "3", set, thisArg)
}, "thisArgValue")
thisArg is undefined
, when it should be "thisArgValue"
Thanks.turansky
11/30/2021, 7:08 AMforEach(action: (T) -> Unit)
Second - forEachIndexed
has no direct mapping, by can be declared with magic Suppress