nativeInvoke
Deprecated
Use inline extension function with body using dynamic
Since Kotlin
1.1Deprecated
Temporary solution until WasmJs <-> Js interoperability will be designed. It may be removed in the future releases.
Marks a member function of an external declaration as the "invoke operator" of a JavaScript object. Every call to this function will be translated into a call of the object itself.
Example:
external class A {
@nativeInvoke
operator fun invoke()
}
fun main() {
val a = A()
a()
}Content copied to clipboard