From 32e5895a2f179fc1c1bdbe1844473520a80b2003 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 23 Dec 2019 12:38:38 -0800 Subject: [PATCH] doc,async_hooks: use code markup/markdown in headers PR-URL: https://github.com/nodejs/node/pull/31086 Reviewed-By: Anna Henningsen Reviewed-By: Ruben Bridgewater --- doc/api/async_hooks.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) 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.