@@ -1010,7 +1010,7 @@ added:
10101010-->
10111011
10121012Creates a new instance of ` AsyncLocalStorage ` . Store is only provided within a
1013- ` run ` or after ` enterWith ` method call.
1013+ ` run() ` call or after an ` enterWith() ` call.
10141014
10151015### ` asyncLocalStorage.disable() `
10161016<!-- YAML
@@ -1019,7 +1019,7 @@ added:
10191019 - v12.17.0
10201020-->
10211021
1022- This method disables the instance of ` AsyncLocalStorage ` . All subsequent calls
1022+ Disables the instance of ` AsyncLocalStorage ` . All subsequent calls
10231023to ` asyncLocalStorage.getStore() ` will return ` undefined ` until
10241024` asyncLocalStorage.run() ` or ` asyncLocalStorage.enterWith() ` is called again.
10251025
@@ -1031,7 +1031,7 @@ Calling `asyncLocalStorage.disable()` is required before the
10311031provided by the ` asyncLocalStorage ` , as those objects are garbage collected
10321032along with the corresponding async resources.
10331033
1034- This method is to be used when the ` asyncLocalStorage ` is not in use anymore
1034+ Use this method when the ` asyncLocalStorage ` is not in use anymore
10351035in the current process.
10361036
10371037### ` asyncLocalStorage.getStore() `
@@ -1043,10 +1043,10 @@ added:
10431043
10441044* Returns: {any}
10451045
1046- This method returns the current store.
1047- If this method is called outside of an asynchronous context initialized by
1048- calling ` asyncLocalStorage.run() ` or ` asyncLocalStorage.enterWith() ` , it will
1049- return ` undefined ` .
1046+ Returns the current store.
1047+ If called outside of an asynchronous context initialized by
1048+ calling ` asyncLocalStorage.run() ` or ` asyncLocalStorage.enterWith() ` , it
1049+ returns ` undefined ` .
10501050
10511051### ` asyncLocalStorage.enterWith(store) `
10521052<!-- YAML
@@ -1057,7 +1057,7 @@ added:
10571057
10581058* ` store ` {any}
10591059
1060- This method transitions into the context for the remainder of the current
1060+ Transitions into the context for the remainder of the current
10611061synchronous execution and then persists the store through any following
10621062asynchronous calls.
10631063
@@ -1077,7 +1077,7 @@ This transition will continue for the _entire_ synchronous execution.
10771077This means that if, for example, the context is entered within an event
10781078handler subsequent event handlers will also run within that context unless
10791079specifically bound to another context with an ` AsyncResource ` . That is why
1080- ` run ` should be preferred over ` enterWith ` unless there are strong reasons
1080+ ` run() ` should be preferred over ` enterWith() ` unless there are strong reasons
10811081to use the latter method.
10821082
10831083``` js
@@ -1106,7 +1106,7 @@ added:
11061106* ` callback ` {Function}
11071107* ` ...args ` {any}
11081108
1109- This methods runs a function synchronously within a context and return its
1109+ Runs a function synchronously within a context and returns its
11101110return value. The store is not accessible outside of the callback function or
11111111the asynchronous operations created within the callback.
11121112
@@ -1140,7 +1140,7 @@ added:
11401140* ` callback ` {Function}
11411141* ` ...args ` {any}
11421142
1143- This methods runs a function synchronously outside of a context and return its
1143+ Runs a function synchronously outside of a context and returns its
11441144return value. The store is not accessible within the callback function or
11451145the asynchronous operations created within the callback. Any ` getStore() `
11461146call done within the callback function will always return ` undefined ` .
0 commit comments