3 ms·
Actually, the Kotlin equivalent to TS' any is 'dynamic': https://kotlinlang.org/docs/tutorials/javascript/working-with-javascript.html#using-dynamic https://kot
by winter_blue 9y ago
Actually, the Kotlin equivalent to TS' any is 'dynamic': https://kotlinlang.org/docs/tutorials/javascript/working-with-javascript.html#using-dynamic https://kotlinlang.org/docs/tutorials/javascript/working-wit...
You can declare a `dynamic` Kotlin variable like this:
val myObject: dynamic = null
The myObject above is not type-safe. It seems that the reason for its existence is interop with existing JavaScript code.
The Kotlin `Any` class is actaully more related to Java's `Object` class. (It's the superclass of every Kotlin class.)