Callbacks

object Callbacks

Functions

Link copied to clipboard
fun adapt(args: List<Any?>, paramCount: Int): List<Any?>

Adapt a list of positional args to exactly paramCount (truncate extras, pad with nulls).

Link copied to clipboard
fun resolve(callback: Any): JimCallback

Normalize a script callback into a JimCallback. A GraalJS Value that is executable becomes a GraalCallback; anything else is treated as a single-abstract-method object (a lambda or a GraalJS function already coerced to a functional interface) and becomes a HandleCallback.