Skip to main content

bind

method AsyncResource.bind
Jump to headingAsyncResource.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 Jump to heading

Jump to headingFunc extends (
this: ThisArg,
...args: any[],
) => any

Parameters Jump to heading

The function to bind to the current execution context.

optional
Jump to headingtype: string

An optional name to associate with the underlying AsyncResource.

optional
Jump to headingthisArg: ThisArg

Return Type Jump to heading

Back to top