Skip to content

Commit 5d66646

Browse files
rluvatondanielleadams
authored andcommitted
doc: correct cjs code to match mjs code
PR-URL: #39509 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Harshitha K P <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Vladimir de Turckheim <[email protected]>
1 parent f18bb2a commit 5d66646

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/api/async_hooks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,14 +374,14 @@ net.createServer((conn) => {}).listen(8080);
374374

375375
```cjs
376376
const { createHook, executionAsyncId } = require('async_hooks');
377-
const { fd } = require('process').stdout;
377+
const { stdout } = require('process');
378378
const net = require('net');
379379

380380
createHook({
381381
init(asyncId, type, triggerAsyncId) {
382382
const eid = executionAsyncId();
383383
fs.writeSync(
384-
fd,
384+
stdout.fd,
385385
`${type}(${asyncId}): trigger: ${triggerAsyncId} execution: ${eid}\n`);
386386
}
387387
}).enable();

0 commit comments

Comments
 (0)