From 6e869be104374a2970a60de8bfccce9f6197af31 Mon Sep 17 00:00:00 2001 From: Vse Mozhet Byt Date: Sun, 15 Apr 2018 16:05:55 +0300 Subject: [PATCH] doc: unify more headings PR-URL: https://github.com/nodejs/node/pull/20046 Reviewed-By: Trivikram Kamat Reviewed-By: Ruben Bridgewater --- doc/api/async_hooks.md | 38 +++++++++++++++++++------------------- doc/api/dns.md | 2 +- doc/api/esm.md | 7 +++++-- 3 files changed, 25 insertions(+), 22 deletions(-) diff --git a/doc/api/async_hooks.md b/doc/api/async_hooks.md index 63c5f1c8198..2628cc290a5 100644 --- a/doc/api/async_hooks.md +++ b/doc/api/async_hooks.md @@ -75,7 +75,7 @@ function destroy(asyncId) { } function promiseResolve(asyncId) { } ``` -#### `async_hooks.createHook(callbacks)` +#### async_hooks.createHook(callbacks) @@ -677,7 +677,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.emitBefore()` +#### asyncResource.emitBefore() @@ -693,7 +693,7 @@ will abort. For this reason, the `emitBefore` and `emitAfter` APIs are considered deprecated. Please use `runInAsyncScope`, as it provides a much safer alternative. -#### `asyncResource.emitAfter()` +#### asyncResource.emitAfter() @@ -712,18 +712,18 @@ will abort. For this reason, the `emitBefore` and `emitAfter` APIs are considered deprecated. Please use `runInAsyncScope`, as it provides a much safer alternative. -#### `asyncResource.emitDestroy()` +#### asyncResource.emitDestroy() Call all `destroy` hooks. This should only ever be called once. An error will 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. diff --git a/doc/api/dns.md b/doc/api/dns.md index 7787a715f64..a878ad27177 100644 --- a/doc/api/dns.md +++ b/doc/api/dns.md @@ -56,7 +56,7 @@ dns.resolve4('archive.org', (err, addresses) => { There are subtle consequences in choosing one over the other, please consult the [Implementation considerations section][] for more information. -## Class dns.Resolver +## Class: dns.Resolver diff --git a/doc/api/esm.md b/doc/api/esm.md index 61e210637f0..4090e545fdb 100644 --- a/doc/api/esm.md +++ b/doc/api/esm.md @@ -37,11 +37,14 @@ Only the CLI argument for the main entry point to the program can be an entry point into an ESM graph. Dynamic import can also be used to create entry points into ESM graphs at runtime. -#### `import.meta` +#### import.meta + +* {Object} The `import.meta` metaproperty is an `Object` that contains the following property: -* `url` {string} The absolute `file:` URL of the module + +* `url` {string} The absolute `file:` URL of the module. ### Unsupported