diff --git a/doc/api/async_hooks.md b/doc/api/async_hooks.md index 2d981652efdd0d..893c6cc77a386c 100644 --- a/doc/api/async_hooks.md +++ b/doc/api/async_hooks.md @@ -78,7 +78,7 @@ function destroy(asyncId) { } function promiseResolve(asyncId) { } ``` -#### async_hooks.createHook(callbacks) +#### `async_hooks.createHook(callbacks)` @@ -664,7 +664,7 @@ of the async resource. This will establish the context, trigger the AsyncHooks before callbacks, call the function, trigger the AsyncHooks after callbacks, and then restore the original execution context. -#### asyncResource.emitDestroy() +#### `asyncResource.emitDestroy()` * Returns: {AsyncResource} A reference to `asyncResource`. @@ -673,11 +673,11 @@ be thrown if it is called more than once. This **must** be manually called. If the resource is left to be collected by the GC then the `destroy` hooks will never be called. -#### asyncResource.asyncId() +#### `asyncResource.asyncId()` * Returns: {number} The unique `asyncId` assigned to the resource. -#### asyncResource.triggerAsyncId() +#### `asyncResource.triggerAsyncId()` * Returns: {number} The same `triggerAsyncId` that is passed to the `AsyncResource` constructor.