function
fun JsObject.function(name: String, arity: Int = 0, flags: PropertyFlags = PropertyFlags(enumerable = false), body: (List<JsValue>) -> Any?): JsFunction(source)
A host function that takes the arguments as they came.
inline fun <reified A, reified R> JsObject.function(name: String, crossinline body: (A) -> R): JsFunction(source)
A one-argument host function, with the argument and the answer converted for you.
inline fun <reified A, reified B, reified R> JsObject.function(name: String, crossinline body: (A, B) -> R): JsFunction(source)
A two-argument host function.
inline fun <reified A, reified B, reified C, reified R> JsObject.function(name: String, crossinline body: (A, B, C) -> R): JsFunction(source)
A three-argument host function.