Skip to main content
Process.getActiveResourcesInfo - node__process.d.ts - Node documentation
method Process.getActiveResourcesInfo

Usage in Deno

```typescript import { type Process } from "node:node__process.d.ts"; ```
Process.getActiveResourcesInfo(): string[]
The `process.getActiveResourcesInfo()` method returns an array of strings containing the types of the active resources that are currently keeping the event loop alive. ```js import { getActiveResourcesInfo } from 'node:process'; import { setTimeout } from 'node:timers'; console.log('Before:', getActiveResourcesInfo()); setTimeout(() => {}, 1000); console.log('After:', getActiveResourcesInfo()); // Prints: // Before: [ 'TTYWrap', 'TTYWrap', 'TTYWrap' ] // After: [ 'TTYWrap', 'TTYWrap', 'TTYWrap', 'Timeout' ] ```

Return Type

string[]