How do I define a Kotlin external class/function f...
# javascript
c
How do I define a Kotlin external class/function for a Javascript method that uses rest parameters? I’m looking at D1PreparedStatement bind with this Javascript signature:
Copy code
bind(...values: unknown[]): D1PreparedStatement;
I’ve tried this in Kotlin:
Copy code
external interface PreparedStatement {
    fun bind(vararg params: dynamic): PreparedStatement
}
But that doesn’t seem to be correct, emitting the error “Type ‘object’ not supported for value ‘asdf’“.
t
In definitions it's class as I see
'bind` signature looks fine, except
dynamic
usage
c
What should the type argument be?
t
Any?
- Kotlin alias for
unknown
c
Changing the type to Any? got it working 🦜 Thank you!