Skip to main content
AsyncResource.prototype.bind - node__async_hooks.d.ts - Node documentation
method AsyncResource.prototype.bind

Usage in Deno

```typescript import { AsyncResource } from "node:node__async_hooks.d.ts"; ```
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