how do I type the this binding of a function? type...
# javascript
b
how do I type the this binding of a function? typescript has:
Copy code
function x(this: Class)
r
Maybe this thing? I haven't had a use for it but it seems to be what it's for: https://github.com/JetBrains/kotlin-wrappers
b
I don't think this is a JS issue, I think that's more of a Kotlin typesystem thing
r
Right - I think the point of this library^ is to make typescript types available in Kotlin. There could be a class-equialent type available Also fwiw "Class" might just work. And if not you can type it as
Any
and then treat it as
dynamic
if you need to interact with it