diff --git a/doc/api/async_hooks.md b/doc/api/async_hooks.md index 1b408ba97b717c..a5571c30be575d 100644 --- a/doc/api/async_hooks.md +++ b/doc/api/async_hooks.md @@ -768,6 +768,7 @@ import { executionAsyncId } from 'node:async_hooks'; import fs from 'node:fs'; console.log(executionAsyncId()); // 1 - bootstrap +const path = '.'; fs.open(path, 'r', (err, fd) => { console.log(executionAsyncId()); // 6 - open() }); @@ -778,6 +779,7 @@ const async_hooks = require('node:async_hooks'); const fs = require('node:fs'); console.log(async_hooks.executionAsyncId()); // 1 - bootstrap +const path = '.'; fs.open(path, 'r', (err, fd) => { console.log(async_hooks.executionAsyncId()); // 6 - open() });