Skip to content

Commit

Permalink
Update async_context.md
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhamsharma088 authored Mar 18, 2023
1 parent f7e9a12 commit 2cf2272
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/api/async_context.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down

0 comments on commit 2cf2272

Please sign in to comment.