doc: fix typos in async_context.md

PR-URL: https://github.com/nodejs/node/pull/47155
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
This commit is contained in:
Shubham Sharma authored and GitHub committed 2023-03-20 22:21:03 +00:00
1 parent 252a069007
commit 965ea9d586
1 file changed
+1 -1
+1 -1
View File
@@ -167,7 +167,7 @@ calls the function passed to it within the captured context.
```js
const asyncLocalStorage = new AsyncLocalStorage();
const runInAsyncScope = asyncLocalStorage.run(123, () => asyncLocalStorage.snapshot());
const runInAsyncScope = asyncLocalStorage.run(123, () => AsyncLocalStorage.snapshot());
const result = asyncLocalStorage.run(321, () => runInAsyncScope(() => asyncLocalStorage.getStore()));
console.log(result); // returns 123
```