@@ -79,12 +79,12 @@ function promiseResolve(asyncId) { }
7979added: v8.1.0
8080-->
8181
82- * ` callbacks ` {Object} the [ Hook Callbacks] [ ] to register
82+ * ` callbacks ` {Object} The [ Hook Callbacks] [ ] to register
8383 * ` init ` {Function} The [ ` init ` callback] [ ] .
8484 * ` before ` {Function} The [ ` before ` callback] [ ] .
8585 * ` after ` {Function} The [ ` after ` callback] [ ] .
8686 * ` destroy ` {Function} The [ ` destroy ` callback] [ ] .
87- * Returns: ` {AsyncHook} ` instance used for disabling and enabling hooks
87+ * Returns: ` {AsyncHook} ` Instance used for disabling and enabling hooks
8888
8989Registers functions to be called for different lifetime events of each async
9090operation.
@@ -168,7 +168,7 @@ doing this the otherwise infinite recursion is broken.
168168
169169#### ` asyncHook.enable() `
170170
171- * Returns {AsyncHook} A reference to ` asyncHook ` .
171+ * Returns: {AsyncHook} A reference to ` asyncHook ` .
172172
173173Enable the callbacks for a given ` AsyncHook ` instance. If no callbacks are
174174provided enabling is a noop.
@@ -184,7 +184,7 @@ const hook = async_hooks.createHook(callbacks).enable();
184184
185185#### ` asyncHook.disable() `
186186
187- * Returns {AsyncHook} A reference to ` asyncHook ` .
187+ * Returns: {AsyncHook} A reference to ` asyncHook ` .
188188
189189Disable the callbacks for a given ` AsyncHook ` instance from the global pool of
190190AsyncHook callbacks to be executed. Once a hook has been disabled it will not
@@ -200,12 +200,12 @@ instance is destructed.
200200
201201##### ` init(asyncId, type, triggerAsyncId, resource) `
202202
203- * ` asyncId ` {number} a unique ID for the async resource
204- * ` type ` {string} the type of the async resource
205- * ` triggerAsyncId ` {number} the unique ID of the async resource in whose
206- execution context this async resource was created
207- * ` resource ` {Object} reference to the resource representing the async operation,
208- needs to be released during _ destroy_
203+ * ` asyncId ` {number} A unique ID for the async resource.
204+ * ` type ` {string} The type of the async resource.
205+ * ` triggerAsyncId ` {number} The unique ID of the async resource in whose
206+ execution context this async resource was created.
207+ * ` resource ` {Object} Reference to the resource representing the async operation,
208+ needs to be released during _ destroy_ .
209209
210210Called when a class is constructed that has the _ possibility_ to emit an
211211asynchronous event. This _ does not_ mean the instance must call
@@ -468,7 +468,7 @@ init for PROMISE with id 6, trigger id: 5 # the Promise returned by then()
468468
469469#### ` async_hooks.executionAsyncId() `
470470
471- * Returns {number} the ` asyncId ` of the current execution context. Useful to
471+ * Returns: {number} The ` asyncId ` of the current execution context. Useful to
472472 track when something calls.
473473
474474For example:
@@ -502,7 +502,7 @@ const server = net.createServer(function onConnection(conn) {
502502
503503#### ` async_hooks.triggerAsyncId() `
504504
505- * Returns {number} the ID of the resource responsible for calling the callback
505+ * Returns: {number} The ID of the resource responsible for calling the callback
506506 that is currently being executed.
507507
508508For example:
@@ -569,9 +569,9 @@ asyncResource.triggerAsyncId();
569569#### ` AsyncResource(type[, triggerAsyncId]) `
570570
571571* arguments
572- * ` type ` {string} the type of async event
573- * ` triggerAsyncId ` {number} the ID of the execution context that created this
574- async event
572+ * ` type ` {string} The type of async event.
573+ * ` triggerAsyncId ` {number} The ID of the execution context that created this
574+ async event.
575575
576576Example usage:
577577
@@ -599,15 +599,15 @@ class DBQuery extends AsyncResource {
599599
600600#### ` asyncResource.emitBefore() `
601601
602- * Returns {undefined}
602+ * Returns: {undefined}
603603
604604Call all ` before ` callbacks to notify that a new asynchronous execution context
605605is being entered. If nested calls to ` emitBefore() ` are made, the stack of
606606` asyncId ` s will be tracked and properly unwound.
607607
608608#### ` asyncResource.emitAfter() `
609609
610- * Returns {undefined}
610+ * Returns: {undefined}
611611
612612Call all ` after ` callbacks. If nested calls to ` emitBefore() ` were made, then
613613make sure the stack is unwound properly. Otherwise an error will be thrown.
@@ -618,7 +618,7 @@ called for all `asyncId`s on the stack if the error is handled by a domain or
618618
619619#### ` asyncResource.emitDestroy() `
620620
621- * Returns {undefined}
621+ * Returns: {undefined}
622622
623623Call all ` destroy ` hooks. This should only ever be called once. An error will
624624be thrown if it is called more than once. This ** must** be manually called. If
@@ -627,11 +627,11 @@ never be called.
627627
628628#### ` asyncResource.asyncId() `
629629
630- * Returns {number} the unique ` asyncId ` assigned to the resource.
630+ * Returns: {number} The unique ` asyncId ` assigned to the resource.
631631
632632#### ` asyncResource.triggerAsyncId() `
633633
634- * Returns {number} the same ` triggerAsyncId ` that is passed to the ` AsyncResource `
634+ * Returns: {number} The same ` triggerAsyncId ` that is passed to the ` AsyncResource `
635635constructor.
636636
637637[ `after` callback ] : #async_hooks_after_asyncid
0 commit comments