Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
class AsyncResource
import { AsyncResource } from "https://deno.land/std@0.145.0/node/async_hooks.ts";

Constructors

new
AsyncResource(type: string, opts?: AsyncResourceOptions)

Properties

[async_id_symbol]: number
[destroyedSymbol]: { destroyed: boolean; }
[trigger_async_id_symbol]: number

Methods

bind(fn: (...args: unknown[]) => unknown, thisArg?)
runInAsyncScope(
fn: (...args: unknown[]) => unknown,
thisArg: unknown,
...args: unknown[],
)

Static Methods

bind(
fn: (...args: unknown[]) => unknown,
type: string | undefined,
thisArg: AsyncResource | undefined,
)