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