Skip to main content
Domain.prototype.enter - node__domain.d.ts - Node documentation
method Domain.prototype.enter

Usage in Deno

```typescript import { Domain } from "node:node__domain.d.ts"; ```
Domain.prototype.enter(): void
The `enter()` method is plumbing used by the `run()`, `bind()`, and `intercept()` methods to set the active domain. It sets `domain.active` and `process.domain` to the domain, and implicitly pushes the domain onto the domain stack managed by the domain module (see exit for details on the domain stack). The call to `enter()` delimits the beginning of a chain of asynchronous calls and I/O operations bound to a domain. Calling `enter()` changes only the active domain, and does not alter the domain itself. `enter()` and `exit()` can be called an arbitrary number of times on a single domain.

Return Type

void