diff --git a/doc/api/async_hooks.md b/doc/api/async_hooks.md index 6abc66bfb8d815..24ad177feff032 100644 --- a/doc/api/async_hooks.md +++ b/doc/api/async_hooks.md @@ -1000,14 +1000,14 @@ added: v13.10.0 --> Creates a new instance of `AsyncLocalStorage`. Store is only provided within a -`run` or after `enterWith` method call. +`run()` call or after an `enterWith()` call. ### `asyncLocalStorage.disable()` -This method disables the instance of `AsyncLocalStorage`. All subsequent calls +Disables the instance of `AsyncLocalStorage`. All subsequent calls to `asyncLocalStorage.getStore()` will return `undefined` until `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()` is called again. @@ -1019,7 +1019,7 @@ Calling `asyncLocalStorage.disable()` is required before the provided by the `asyncLocalStorage`, as those objects are garbage collected along with the corresponding async resources. -This method is to be used when the `asyncLocalStorage` is not in use anymore +Use this method when the `asyncLocalStorage` is not in use anymore in the current process. ### `asyncLocalStorage.getStore()` @@ -1029,10 +1029,10 @@ added: v13.10.0 * Returns: {any} -This method returns the current store. -If this method is called outside of an asynchronous context initialized by -calling `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()`, it will -return `undefined`. +Returns the current store. +If called outside of an asynchronous context initialized by +calling `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()`, it +returns `undefined`. ### `asyncLocalStorage.enterWith(store)`