deno.com

method AsyncResource.bind

#AsyncResource.bind<
Func extends (
this: ThisArg,
...args: any[],
) => any
,
ThisArg,
>
(
fn: Func,
type?: string,
thisArg?: ThisArg,
): Func

Binds the given function to the current execution context.

Type Parameters #

#Func extends (
this: ThisArg,
...args: any[],
) => any
#ThisArg

Parameters #

#fn: Func

The function to bind to the current execution context.

#type: string
optional

An optional name to associate with the underlying AsyncResource.

#thisArg: ThisArg
optional

Return Type #