We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
nodejs
Learn more about funding links in repositories.
Report abuse
1 parent 4c69be4 commit d562a7cCopy full SHA for d562a7c
doc/api/async_context.md
@@ -165,7 +165,7 @@ calls the function passed to it within the captured context.
165
166
```js
167
const asyncLocalStorage = new AsyncLocalStorage();
168
-const runInAsyncScope = asyncLocalStorage.run(123, () => asyncLocalStorage.snapshot());
+const runInAsyncScope = asyncLocalStorage.run(123, () => AsyncLocalStorage.snapshot());
169
const result = asyncLocalStorage.run(321, () => runInAsyncScope(() => asyncLocalStorage.getStore()));
170
console.log(result); // returns 123
171
```
0 commit comments