Hello! I am trying to rewrite part of our JS code ...
# javascript
r
Hello! I am trying to rewrite part of our JS code to Kotlin but I am stuck on IntersectionObserver. When I try to use callback this error occurs: How can I implement IntersectionObserver in Kotlin JS?
a
IntersectionObserverCallback is just an alias to a functional type. So, you can define it as a lambda or an anonymous function.
Copy code
val callback: IntersectionObserverCallback = { entries, observer ->
  TODO()
}
r
Great, thanks!
🫡 3