bind

fun <Func : Function<Any?>, ThisArg> bind(fn: Func, type: String = definedExternally, thisArg: ThisArg = definedExternally): Func(source)

Binds the given function to the current execution context.

Since

v14.8.0, v12.19.0

Parameters

fn

The function to bind to the current execution context.

type

An optional name to associate with the underlying AsyncResource.