File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1478,9 +1478,9 @@ require manual async tracking. Specifically, all events emitted by instances
1478
1478
of ` events.EventEmitterAsyncResource ` will run within its [ async context] [ ] .
1479
1479
1480
1480
``` mjs
1481
- import { EventEmitterAsyncResource } from ' node:events' ;
1481
+ import { EventEmitterAsyncResource , EventEmitter } from ' node:events' ;
1482
1482
import { notStrictEqual , strictEqual } from ' node:assert' ;
1483
- import { executionAsyncId } from ' node:async_hooks' ;
1483
+ import { executionAsyncId , triggerAsyncId } from ' node:async_hooks' ;
1484
1484
1485
1485
// Async tracking tooling will identify this as 'Q'.
1486
1486
const ee1 = new EventEmitterAsyncResource ({ name: ' Q' });
@@ -1507,9 +1507,9 @@ Promise.resolve().then(() => {
1507
1507
```
1508
1508
1509
1509
``` cjs
1510
- const { EventEmitterAsyncResource } = require (' node:events' );
1510
+ const { EventEmitterAsyncResource , EventEmitter } = require (' node:events' );
1511
1511
const { notStrictEqual , strictEqual } = require (' node:assert' );
1512
- const { executionAsyncId } = require (' node:async_hooks' );
1512
+ const { executionAsyncId , triggerAsyncId } = require (' node:async_hooks' );
1513
1513
1514
1514
// Async tracking tooling will identify this as 'Q'.
1515
1515
const ee1 = new EventEmitterAsyncResource ({ name: ' Q' });
You can’t perform that action at this time.
0 commit comments