@@ -1010,7 +1010,7 @@ added:
1010
1010
-->
1011
1011
1012
1012
Creates 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.
1014
1014
1015
1015
### ` asyncLocalStorage.disable() `
1016
1016
<!-- YAML
@@ -1019,7 +1019,7 @@ added:
1019
1019
- v12.17.0
1020
1020
-->
1021
1021
1022
- This method disables the instance of ` AsyncLocalStorage ` . All subsequent calls
1022
+ Disables the instance of ` AsyncLocalStorage ` . All subsequent calls
1023
1023
to ` asyncLocalStorage.getStore() ` will return ` undefined ` until
1024
1024
` asyncLocalStorage.run() ` or ` asyncLocalStorage.enterWith() ` is called again.
1025
1025
@@ -1031,7 +1031,7 @@ Calling `asyncLocalStorage.disable()` is required before the
1031
1031
provided by the ` asyncLocalStorage ` , as those objects are garbage collected
1032
1032
along with the corresponding async resources.
1033
1033
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
1035
1035
in the current process.
1036
1036
1037
1037
### ` asyncLocalStorage.getStore() `
@@ -1043,10 +1043,10 @@ added:
1043
1043
1044
1044
* Returns: {any}
1045
1045
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 ` .
1050
1050
1051
1051
### ` asyncLocalStorage.enterWith(store) `
1052
1052
<!-- YAML
@@ -1057,7 +1057,7 @@ added:
1057
1057
1058
1058
* ` store ` {any}
1059
1059
1060
- This method transitions into the context for the remainder of the current
1060
+ Transitions into the context for the remainder of the current
1061
1061
synchronous execution and then persists the store through any following
1062
1062
asynchronous calls.
1063
1063
@@ -1077,7 +1077,7 @@ This transition will continue for the _entire_ synchronous execution.
1077
1077
This means that if, for example, the context is entered within an event
1078
1078
handler subsequent event handlers will also run within that context unless
1079
1079
specifically 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
1081
1081
to use the latter method.
1082
1082
1083
1083
``` js
@@ -1106,7 +1106,7 @@ added:
1106
1106
* ` callback ` {Function}
1107
1107
* ` ...args ` {any}
1108
1108
1109
- This methods runs a function synchronously within a context and return its
1109
+ Runs a function synchronously within a context and returns its
1110
1110
return value. The store is not accessible outside of the callback function or
1111
1111
the asynchronous operations created within the callback.
1112
1112
@@ -1140,7 +1140,7 @@ added:
1140
1140
* ` callback ` {Function}
1141
1141
* ` ...args ` {any}
1142
1142
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
1144
1144
return value. The store is not accessible within the callback function or
1145
1145
the asynchronous operations created within the callback. Any ` getStore() `
1146
1146
call done within the callback function will always return ` undefined ` .
0 commit comments