AsyncResource.prototype.bind - Node documentation
method AsyncResource.prototype.bind

Usage in Deno

import { AsyncResource } from "node:async_hooks";
AsyncResource.prototype.bind<Func extends (...args: any[]) => any>(fn: Func): Func

Binds the given function to execute to this AsyncResource's scope.

Type Parameters

Func extends (...args: any[]) => any

Parameters

fn: Func

The function to bind to the current AsyncResource.

Return Type