From 67c8e2b32fe05c83a61c68bdf4a3fe45f2a5c06c Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 2 Jan 2021 05:48:05 -0800 Subject: [PATCH] doc: revise method text in async_hooks.md Fix two typographical errors ("This methods") and general minor edits around the use of the word "method" in async_hooks.md. PR-URL: https://github.com/nodejs/node/pull/36736 Reviewed-By: Gireesh Punathil Reviewed-By: Harshitha K P --- doc/api/async_hooks.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/api/async_hooks.md b/doc/api/async_hooks.md index acc5d671711c69..a353ef3b7b9f8f 100644 --- a/doc/api/async_hooks.md +++ b/doc/api/async_hooks.md @@ -1010,7 +1010,7 @@ added: --> 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. @@ -1031,7 +1031,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()` @@ -1043,10 +1043,10 @@ added: * 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)`