All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jsMain.kotlinext.js.Function.kt Maven / Gradle / Ivy

There is a newer version: 1.0.1-pre.808
Show newest version
package kotlinext.js

external interface JsFunction {
    fun call(ctx: C, vararg args: Any?): O
    fun apply(ctx: C, args: Array): O
    fun bind(ctx: C, vararg args: Any?): JsFunction

    val length: Int
}

external interface JsFunction0 : JsFunction

operator fun  JsFunction0.invoke() = asDynamic()()

external interface JsFunction1 : JsFunction

operator fun  JsFunction1.invoke(arg: I) =
    asDynamic()(arg)

external interface JsFunction2 : JsFunction

operator fun  JsFunction2.invoke(arg1: I1, arg2: I2) =
    asDynamic()(arg1, arg2)

external interface JsFunction3 : JsFunction

operator fun  JsFunction3.invoke(arg1: I1, arg2: I2, arg3: I3) =
    asDynamic()(arg1, arg2, arg3)





© 2015 - 2024 Weber Informatics LLC | Privacy Policy