| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e3d98c3 commit 7ec87fd
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -167,7 +167,7 @@ calls the function passed to it within the captured context. | |||
| 167 | 167 | ||
| 168 | 168 | ```js | |
| 169 | 169 | const asyncLocalStorage = new AsyncLocalStorage(); | |
| 170 | - const runInAsyncScope = asyncLocalStorage.run(123, () => asyncLocalStorage.snapshot()); | ||
| 170 | + const runInAsyncScope = asyncLocalStorage.run(123, () => AsyncLocalStorage.snapshot()); | ||
| 171 | 171 | const result = asyncLocalStorage.run(321, () => runInAsyncScope(() => asyncLocalStorage.getStore())); | |
| 172 | 172 | console.log(result); // returns 123 | |
| 173 | 173 | ``` | |
| Back | FazBrowse Home | New Git URL |
0 commit comments