If I have a JS function that takes any other funct...
# javascript
j
If I have a JS function that takes any other function as a parameter, how do I specify that as a kotlin function? My guess would be something like this
external fun highOrderFoo(bar: (dynamic) -> dynamic): Promise<Json>
But what if
bar
is a function that takes multiple params?
n
How would you use that any other function on the Kotlin side if you know nothing about it? It could be simply
dynamic
because you cannot call it if you don't know about its required parameters...
t
Copy code
external fun highOrderFoo(
    bar: (
        param1: Any?,
        param2: Any?,
        param3: Any?,
    ) -> Any?
): Promise<Json>